@thekestongroup/ui 0.9.1 → 0.10.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/CardSelect/CardSelect.vue.d.ts +59 -0
- package/dist/components/ChangeIndicator/ChangeIndicator.vue.d.ts +20 -0
- package/dist/components/ChangeIndicator/changeIndicator.d.ts +5 -0
- package/dist/components/Checklist/Checklist.vue.d.ts +2 -0
- package/dist/components/Steps/Steps.vue.d.ts +1 -1
- package/dist/components/UnsavedChangesBar/UnsavedChangesBar.vue.d.ts +46 -0
- package/dist/i18n/en.d.ts +8 -0
- package/dist/index.d.ts +6 -0
- package/dist/keston-ui.js +741 -499
- package/package.json +1 -1
- package/src/components/CardSelect/CardSelect.stories.ts +88 -0
- package/src/components/CardSelect/CardSelect.vue +151 -0
- package/src/components/ChangeIndicator/ChangeIndicator.stories.ts +32 -0
- package/src/components/ChangeIndicator/ChangeIndicator.vue +42 -0
- package/src/components/ChangeIndicator/changeIndicator.test.ts +21 -0
- package/src/components/ChangeIndicator/changeIndicator.ts +11 -0
- package/src/components/Checklist/Checklist.stories.ts +6 -0
- package/src/components/Checklist/Checklist.vue +3 -1
- package/src/components/Header/Header.vue +3 -2
- package/src/components/Slideover/Slideover.vue +5 -3
- package/src/components/Steps/Steps.vue +2 -2
- package/src/components/UnsavedChangesBar/UnsavedChangesBar.stories.ts +62 -0
- package/src/components/UnsavedChangesBar/UnsavedChangesBar.vue +87 -0
- package/src/i18n/en.ts +6 -0
- package/src/i18n/i18n.test.ts +10 -0
- package/src/index.ts +6 -0
package/dist/keston-ui.js
CHANGED
|
@@ -2,7 +2,7 @@ import { clsx as e } from "clsx";
|
|
|
2
2
|
import { twMerge as t } from "tailwind-merge";
|
|
3
3
|
import { Fragment as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createTextVNode as u, createVNode as d, defineComponent as f, guardReactiveProps as p, h as m, isRef as h, mergeModels as g, mergeProps as _, nextTick as v, normalizeClass as y, normalizeProps as b, normalizeStyle as x, onBeforeUnmount as S, onMounted as C, openBlock as w, reactive as T, ref as E, renderList as D, renderSlot as O, resolveDynamicComponent as k, shallowRef as A, toDisplayString as j, unref as M, useAttrs as N, useId as P, useModel as F, useSlots as I, vModelDynamic as L, vModelText as R, watch as z, watchEffect as B, withCtx as V, withDirectives as H, withKeys as U, withModifiers as ee } from "vue";
|
|
4
4
|
import { I18nT as W, createI18n as G, useI18n as K } from "vue-i18n";
|
|
5
|
-
import { ArrowDown as
|
|
5
|
+
import { ArrowDown as q, ArrowDownRight as J, ArrowLeftRight as te, ArrowRight as ne, ArrowUp as re, ArrowUpRight as ie, Bell as ae, BellOff as oe, Bold as se, CalendarDays as ce, Check as le, ChevronDown as ue, ChevronLeft as de, ChevronRight as fe, ChevronsUpDown as pe, Circle as me, CircleAlert as he, CircleCheck as ge, CircleHelp as _e, CircleX as ve, Ellipsis as ye, ExternalLink as be, Eye as xe, EyeOff as Y, Info as Se, Italic as Ce, Languages as we, LogOut as Te, Menu as Ee, Minus as De, PanelLeftClose as Oe, PanelLeftOpen as ke, Plus as Ae, Settings as je, TriangleAlert as Me, Underline as Ne, X as Pe } from "@lucide/vue";
|
|
6
6
|
import { CalendarCell as Fe, CalendarCellTrigger as Ie, CalendarGrid as Le, CalendarGridBody as Re, CalendarGridHead as ze, CalendarGridRow as Be, CalendarHeadCell as Ve, CalendarHeader as He, CalendarNext as Ue, CalendarPrev as We, CalendarRoot as Ge, CheckboxIndicator as Ke, CheckboxRoot as qe, ComboboxAnchor as Je, ComboboxContent as Ye, ComboboxEmpty as Xe, ComboboxGroup as Ze, ComboboxInput as Qe, ComboboxItem as $e, ComboboxItemIndicator as et, ComboboxLabel as tt, ComboboxPortal as nt, ComboboxRoot as rt, ComboboxSeparator as it, ComboboxTrigger as at, ComboboxViewport as ot, DatePickerContent as st, DatePickerRoot as ct, DatePickerTrigger as lt, DialogClose as ut, DialogContent as dt, DialogDescription as ft, DialogOverlay as pt, DialogPortal as mt, DialogRoot as ht, DialogTitle as gt, DialogTrigger as _t, DropdownMenuContent as vt, DropdownMenuItem as yt, DropdownMenuPortal as bt, DropdownMenuRoot as xt, DropdownMenuTrigger as St, NumberFieldDecrement as Ct, NumberFieldIncrement as wt, NumberFieldInput as Tt, NumberFieldRoot as Et, PinInputInput as Dt, PinInputRoot as Ot, PopoverAnchor as kt, PopoverArrow as At, PopoverContent as jt, PopoverPortal as Mt, PopoverRoot as Nt, PopoverTrigger as Pt, Primitive as Ft, ProgressIndicator as It, ProgressRoot as Lt, RadioGroupIndicator as Rt, RadioGroupItem as zt, RadioGroupRoot as Bt, SelectContent as Vt, SelectGroup as Ht, SelectItem as Ut, SelectItemIndicator as Wt, SelectItemText as Gt, SelectLabel as Kt, SelectPortal as qt, SelectRoot as Jt, SelectSeparator as Yt, SelectTrigger as Xt, SelectViewport as Zt, Separator as Qt, SwitchRoot as $t, SwitchThumb as en, TabsContent as tn, TabsIndicator as nn, TabsList as rn, TabsRoot as an, TabsTrigger as on, ToastProvider as sn, ToastRoot as cn, ToastViewport as ln, TooltipContent as un, TooltipPortal as dn, TooltipProvider as fn, TooltipRoot as pn, TooltipTrigger as mn, injectTooltipProviderContext as hn } from "reka-ui";
|
|
7
7
|
import { CalendarDate as gn, endOfMonth as _n, getLocalTimeZone as vn, isToday as yn, parseDate as bn, startOfMonth as xn, toCalendarDate as Sn, today as Cn } from "@internationalized/date";
|
|
8
8
|
import { EditorContent as wn, useEditor as Tn } from "@tiptap/vue-3";
|
|
@@ -467,13 +467,7 @@ var Kn = ["z-50 rounded border border-black/15 bg-white text-black shadow-md out
|
|
|
467
467
|
onError: m[1] ||= (e) => l.value = !0
|
|
468
468
|
}, null, 40, sr)) : (w(), s("span", cr, j(r.value), 1))], 10, or));
|
|
469
469
|
}
|
|
470
|
-
}), dr = { class: "flex flex-col" }, fr = {
|
|
471
|
-
key: 0,
|
|
472
|
-
class: "truncate px-4 pt-3 text-xs font-bold text-black/65 uppercase"
|
|
473
|
-
}, pr = { class: "grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-2 px-4 py-3" }, mr = { class: "flex min-w-0 flex-col" }, hr = { class: "truncate font-bold" }, gr = {
|
|
474
|
-
key: 0,
|
|
475
|
-
class: "truncate text-sm text-black/65"
|
|
476
|
-
}, _r = {
|
|
470
|
+
}), dr = { class: "flex flex-col" }, fr = ["title"], pr = { class: "grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-2 px-4 py-3" }, mr = { class: "flex min-w-0 flex-col" }, hr = ["title"], gr = ["title"], _r = {
|
|
477
471
|
key: 1,
|
|
478
472
|
class: "flex items-center gap-2 border-t border-black/15 px-4 py-3"
|
|
479
473
|
}, vr = /* @__PURE__ */ f({
|
|
@@ -567,14 +561,25 @@ var Kn = ["z-50 rounded border border-black/15 bg-white text-black shadow-md out
|
|
|
567
561
|
ui: { content: M(X)("w-72", e.ui?.userMenu) }
|
|
568
562
|
}, {
|
|
569
563
|
content: V(({ close: n }) => [c("div", dr, [
|
|
570
|
-
e.user.organisation ? (w(), s("p",
|
|
564
|
+
e.user.organisation ? (w(), s("p", {
|
|
565
|
+
key: 0,
|
|
566
|
+
class: "truncate px-4 pt-3 text-xs font-bold text-black/65 uppercase",
|
|
567
|
+
title: e.user.organisation
|
|
568
|
+
}, j(e.user.organisation), 9, fr)) : o("", !0),
|
|
571
569
|
c("div", pr, [
|
|
572
570
|
d(ur, {
|
|
573
571
|
user: e.user,
|
|
574
572
|
size: "lg",
|
|
575
573
|
decorative: ""
|
|
576
574
|
}, null, 8, ["user"]),
|
|
577
|
-
c("div", mr, [c("span",
|
|
575
|
+
c("div", mr, [c("span", {
|
|
576
|
+
class: "truncate font-bold",
|
|
577
|
+
title: e.user.name
|
|
578
|
+
}, j(e.user.name), 9, hr), e.user.email ? (w(), s("span", {
|
|
579
|
+
key: 0,
|
|
580
|
+
class: "truncate text-sm text-black/65",
|
|
581
|
+
title: e.user.email
|
|
582
|
+
}, j(e.user.email), 9, gr)) : o("", !0)]),
|
|
578
583
|
e.userActions.includes("account-settings") ? (w(), a(Z, {
|
|
579
584
|
key: 0,
|
|
580
585
|
size: "sm",
|
|
@@ -591,7 +596,7 @@ var Kn = ["z-50 rounded border border-black/15 bg-white text-black shadow-md out
|
|
|
591
596
|
key: 0,
|
|
592
597
|
onClick: (e) => g("switch-account", n)
|
|
593
598
|
}, {
|
|
594
|
-
leading: V(() => [d(M(
|
|
599
|
+
leading: V(() => [d(M(te))]),
|
|
595
600
|
default: V(() => [i[3] ||= u(" Switch account ", -1)]),
|
|
596
601
|
_: 1
|
|
597
602
|
}, 8, ["onClick"])) : o("", !0), e.userActions.includes("log-out") ? (w(), a(Z, {
|
|
@@ -764,10 +769,10 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
764
769
|
"aria-disabled": !0
|
|
765
770
|
} : e.to === void 0 ? { href: e.href } : { to: e.to };
|
|
766
771
|
}
|
|
767
|
-
function
|
|
772
|
+
function q(e, t) {
|
|
768
773
|
e.disabled ? t.preventDefault() : e.children?.length ? U(e) : (e.onSelect?.(t), p("select", e, t));
|
|
769
774
|
}
|
|
770
|
-
let
|
|
775
|
+
let J = [
|
|
771
776
|
"flex h-9.5 w-full items-center gap-3 overflow-hidden rounded px-3 text-left text-sm whitespace-nowrap select-none",
|
|
772
777
|
"cursor-pointer transition [&_svg]:size-4 [&_svg]:shrink-0",
|
|
773
778
|
"outline-2 -outline-offset-2 outline-transparent forced-colors:not-focus-visible:outline-0",
|
|
@@ -797,7 +802,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
797
802
|
type: "button",
|
|
798
803
|
"data-back": "",
|
|
799
804
|
title: m.value ? M(l)("ui.sidebar.backFrom", { name: S.value.label }) : void 0,
|
|
800
|
-
class: y(M(X)(
|
|
805
|
+
class: y(M(X)(J, "font-bold", e.ui?.item)),
|
|
801
806
|
onClick: ee
|
|
802
807
|
}, [d(M(de), { "aria-hidden": "true" }), c("span", { class: y(M(X)("min-w-0 flex-1 truncate", jr, m.value && "opacity-0")) }, [i[1] ||= c("span", { class: "sr-only" }, "Back from ", -1), u(j(S.value.label), 1)], 2)], 10, Er)])) : o("", !0), (w(!0), s(n, null, D(C.value, (r, i) => (w(), s("div", {
|
|
803
808
|
key: i,
|
|
@@ -816,8 +821,8 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
816
821
|
"data-parent": n.children?.length ? n.label : void 0,
|
|
817
822
|
"aria-current": n.active ? "page" : void 0,
|
|
818
823
|
title: m.value ? n.label : void 0,
|
|
819
|
-
class: M(X)(
|
|
820
|
-
onClick: (e) =>
|
|
824
|
+
class: M(X)(J, n.active && Mr, A.value.has(n.label) && Nr, e.ui?.item),
|
|
825
|
+
onClick: (e) => q(n, e)
|
|
821
826
|
}), {
|
|
822
827
|
default: V(() => [O(t.$slots, "item", {
|
|
823
828
|
item: n,
|
|
@@ -919,11 +924,14 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
919
924
|
"class"
|
|
920
925
|
]));
|
|
921
926
|
}
|
|
922
|
-
}), Rr = { class: "flex items-start gap-4" },
|
|
927
|
+
}), Rr = { class: "text-black" }, zr = { class: "flex items-start gap-4" }, Br = { class: "flex min-w-0 flex-1 flex-col gap-1" }, Vr = { key: 0 }, Hr = {
|
|
928
|
+
key: 1,
|
|
929
|
+
class: "sr-only"
|
|
930
|
+
}, Ur = {
|
|
923
931
|
key: 1,
|
|
924
932
|
"aria-live": "polite",
|
|
925
933
|
class: "sr-only"
|
|
926
|
-
},
|
|
934
|
+
}, Wr = ["role", "aria-labelledby"], Gr = "textarea, [contenteditable=\"true\"], input[type=checkbox], input[type=radio], input[type=button], input[type=submit]", Kr = /* @__PURE__ */ f({
|
|
927
935
|
__name: "Slideover",
|
|
928
936
|
props: /*@__PURE__*/ g({
|
|
929
937
|
title: {},
|
|
@@ -1004,7 +1012,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1004
1012
|
}
|
|
1005
1013
|
function L(e) {
|
|
1006
1014
|
let t = e.target;
|
|
1007
|
-
!r.steps || e.defaultPrevented || e.isComposing || t.tagName !== "INPUT" || t.closest(
|
|
1015
|
+
!r.steps || e.defaultPrevented || e.isComposing || t.tagName !== "INPUT" || t.closest(Gr) || (e.preventDefault(), I());
|
|
1008
1016
|
}
|
|
1009
1017
|
let R = 0;
|
|
1010
1018
|
function B(e) {
|
|
@@ -1030,12 +1038,12 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1030
1038
|
let n = t.querySelector("[autofocus], [data-autofocus]"), i = window.matchMedia("(pointer: coarse)").matches ? null : t.querySelector(H), a = n ?? i;
|
|
1031
1039
|
a && (e.preventDefault(), a.focus());
|
|
1032
1040
|
}
|
|
1033
|
-
let G = () => typeof r.portal == "string" || r.portal instanceof HTMLElement ? r.portal : void 0,
|
|
1041
|
+
let G = () => typeof r.portal == "string" || r.portal instanceof HTMLElement ? r.portal : void 0, q = {
|
|
1034
1042
|
right: "inset-y-0 right-0 w-full max-w-md border-l data-[state=open]:animate-slide-in-right data-[state=closed]:animate-slide-out-right",
|
|
1035
1043
|
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",
|
|
1036
1044
|
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",
|
|
1037
1045
|
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"
|
|
1038
|
-
},
|
|
1046
|
+
}, J = ["fixed z-50 flex flex-col bg-white text-black border-black/15 shadow-xl outline-none", "motion-reduce:data-[state=open]:animate-fade-in motion-reduce:data-[state=closed]:animate-fade-out"];
|
|
1039
1047
|
return (t, r) => (w(), a(M(ht), {
|
|
1040
1048
|
open: m.value,
|
|
1041
1049
|
modal: e.modal,
|
|
@@ -1055,7 +1063,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1055
1063
|
key: 0,
|
|
1056
1064
|
class: y(M(X)("fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out", e.ui?.overlay))
|
|
1057
1065
|
}, null, 8, ["class"])) : o("", !0), d(M(dt), _(e.content, {
|
|
1058
|
-
class: M(X)(
|
|
1066
|
+
class: M(X)(J, q[e.side], e.ui?.content),
|
|
1059
1067
|
onEscapeKeyDown: B,
|
|
1060
1068
|
onInteractOutside: B,
|
|
1061
1069
|
onOpenAutoFocus: W
|
|
@@ -1064,48 +1072,53 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1064
1072
|
e.title || e.description || e.close || e.steps || t.$slots.header || t.$slots.title ? (w(), s("header", {
|
|
1065
1073
|
key: 0,
|
|
1066
1074
|
class: y(M(X)("flex flex-col gap-4 border-b border-black/15 px-6 py-4", e.ui?.header))
|
|
1067
|
-
}, [
|
|
1068
|
-
|
|
1069
|
-
label: e.title ?? M(n)("ui.slideover.steps"),
|
|
1070
|
-
segments: "",
|
|
1071
|
-
value: b.value + 1,
|
|
1072
|
-
max: x.value
|
|
1073
|
-
}, null, 8, [
|
|
1074
|
-
"label",
|
|
1075
|
-
"value",
|
|
1076
|
-
"max"
|
|
1077
|
-
])) : o("", !0), c("div", Rr, [O(t.$slots, "header", { close: g }, () => [c("div", zr, [
|
|
1078
|
-
d(M(gt), { class: y(e.title || t.$slots.title ? M(X)("text-lg", e.ui?.title) : "sr-only") }, {
|
|
1079
|
-
default: V(() => [O(t.$slots, "title", {}, () => [u(j(e.title), 1)])]),
|
|
1080
|
-
_: 3
|
|
1081
|
-
}, 8, ["class"]),
|
|
1082
|
-
e.description || t.$slots.description || e.steps ? (w(), a(M(ft), {
|
|
1075
|
+
}, [
|
|
1076
|
+
e.steps ? (w(), s("p", {
|
|
1083
1077
|
key: 0,
|
|
1084
|
-
|
|
1085
|
-
class: "
|
|
1086
|
-
},
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1078
|
+
id: T,
|
|
1079
|
+
class: "text-sm text-black/65"
|
|
1080
|
+
}, [u(" Step " + j(b.value + 1) + " of " + j(x.value) + ": ", 1), c("span", Rr, j(e.steps[b.value]), 1)])) : o("", !0),
|
|
1081
|
+
e.steps ? (w(), a(Lr, {
|
|
1082
|
+
key: 1,
|
|
1083
|
+
label: e.title ?? M(n)("ui.slideover.steps"),
|
|
1084
|
+
segments: "",
|
|
1085
|
+
value: b.value + 1,
|
|
1086
|
+
max: x.value
|
|
1087
|
+
}, null, 8, [
|
|
1088
|
+
"label",
|
|
1089
|
+
"value",
|
|
1090
|
+
"max"
|
|
1091
|
+
])) : o("", !0),
|
|
1092
|
+
c("div", zr, [O(t.$slots, "header", { close: g }, () => [c("div", Br, [
|
|
1093
|
+
d(M(gt), { class: y(e.title || t.$slots.title ? M(X)("text-lg", e.ui?.title) : "sr-only") }, {
|
|
1094
|
+
default: V(() => [O(t.$slots, "title", {}, () => [u(j(e.title), 1)])]),
|
|
1095
|
+
_: 3
|
|
1096
|
+
}, 8, ["class"]),
|
|
1097
|
+
e.description || t.$slots.description || e.steps ? (w(), a(M(ft), {
|
|
1098
|
+
key: 0,
|
|
1099
|
+
as: "div",
|
|
1100
|
+
class: "flex flex-col gap-1 text-sm text-black/65"
|
|
1101
|
+
}, {
|
|
1102
|
+
default: V(() => [e.description || t.$slots.description ? (w(), s("p", Vr, [O(t.$slots, "description", {}, () => [u(j(e.description), 1)])])) : o("", !0), e.steps ? (w(), s("p", Hr, j(D.value), 1)) : o("", !0)]),
|
|
1103
|
+
_: 3
|
|
1104
|
+
})) : o("", !0),
|
|
1105
|
+
e.steps ? (w(), s("p", Ur, j(k.value), 1)) : o("", !0)
|
|
1106
|
+
]), e.close ? (w(), a(M(ut), {
|
|
1107
|
+
key: 0,
|
|
1108
|
+
"as-child": ""
|
|
1103
1109
|
}, {
|
|
1104
|
-
default: V(() => [d(
|
|
1110
|
+
default: V(() => [d(Z, {
|
|
1111
|
+
variant: "ghost",
|
|
1112
|
+
square: "",
|
|
1113
|
+
"aria-label": M(n)("ui.slideover.close"),
|
|
1114
|
+
class: "-my-1.5 -mr-3 shrink-0"
|
|
1115
|
+
}, {
|
|
1116
|
+
default: V(() => [d(M(Pe))]),
|
|
1117
|
+
_: 1
|
|
1118
|
+
}, 8, ["aria-label"])]),
|
|
1105
1119
|
_: 1
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
})) : o("", !0)])])], 2)) : o("", !0),
|
|
1120
|
+
})) : o("", !0)])])
|
|
1121
|
+
], 2)) : o("", !0),
|
|
1109
1122
|
c("div", {
|
|
1110
1123
|
ref_key: "body",
|
|
1111
1124
|
ref: A,
|
|
@@ -1116,7 +1129,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1116
1129
|
}, [O(t.$slots, "body", {
|
|
1117
1130
|
close: g,
|
|
1118
1131
|
step: b.value
|
|
1119
|
-
})], 42,
|
|
1132
|
+
})], 42, Wr),
|
|
1120
1133
|
t.$slots.footer || e.steps ? (w(), s("footer", {
|
|
1121
1134
|
key: 1,
|
|
1122
1135
|
class: y(M(X)("flex justify-end gap-2 border-t border-black/15 px-6 py-4", e.ui?.footer))
|
|
@@ -1151,7 +1164,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1151
1164
|
_: 3
|
|
1152
1165
|
}, 8, ["open", "modal"]));
|
|
1153
1166
|
}
|
|
1154
|
-
}),
|
|
1167
|
+
}), qr = ["href"], Jr = { class: "flex flex-1" }, Yr = { class: "sticky top-12 hidden h-[calc(100dvh-var(--spacing)*12)] shrink-0 self-start lg:flex" }, Xr = /* @__PURE__ */ f({
|
|
1155
1168
|
__name: "AppShell",
|
|
1156
1169
|
props: /*@__PURE__*/ g({
|
|
1157
1170
|
title: {},
|
|
@@ -1213,7 +1226,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1213
1226
|
c("a", {
|
|
1214
1227
|
href: `#${g}`,
|
|
1215
1228
|
class: "sr-only z-50 rounded bg-white px-4 py-2 text-sm focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:outline-2 focus:outline-focus"
|
|
1216
|
-
}, " Skip to content ", 8,
|
|
1229
|
+
}, " Skip to content ", 8, qr),
|
|
1217
1230
|
d(vr, _(e.header, {
|
|
1218
1231
|
title: e.title,
|
|
1219
1232
|
"title-to": e.titleTo,
|
|
@@ -1275,8 +1288,8 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1275
1288
|
"sign-in",
|
|
1276
1289
|
"ui"
|
|
1277
1290
|
]),
|
|
1278
|
-
c("div",
|
|
1279
|
-
c("div",
|
|
1291
|
+
c("div", Jr, [
|
|
1292
|
+
c("div", Yr, [d(Pr, _(e.sidebar, {
|
|
1280
1293
|
id: v,
|
|
1281
1294
|
collapsed: s.value,
|
|
1282
1295
|
"onUpdate:collapsed": f[6] ||= (e) => s.value = e,
|
|
@@ -1297,7 +1310,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1297
1310
|
"sections",
|
|
1298
1311
|
"link-component"
|
|
1299
1312
|
])]),
|
|
1300
|
-
d(
|
|
1313
|
+
d(Kr, {
|
|
1301
1314
|
open: u.value,
|
|
1302
1315
|
"onUpdate:open": f[8] ||= (e) => u.value = e,
|
|
1303
1316
|
side: "left",
|
|
@@ -1336,7 +1349,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1336
1349
|
_: 3
|
|
1337
1350
|
}));
|
|
1338
1351
|
}
|
|
1339
|
-
}),
|
|
1352
|
+
}), Zr = ["aria-label"], Qr = { class: "flex flex-wrap items-center gap-x-1.5 gap-y-1" }, $r = ["title"], ei = { class: "truncate" }, ti = { class: "truncate" }, ni = ["title"], ri = { class: "truncate" }, ii = "inline-flex max-w-60 min-w-0 items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:shrink-0", ai = /* @__PURE__ */ f({
|
|
1340
1353
|
__name: "Breadcrumb",
|
|
1341
1354
|
props: {
|
|
1342
1355
|
items: {},
|
|
@@ -1372,29 +1385,29 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1372
1385
|
return (t, l) => (w(), s("nav", {
|
|
1373
1386
|
"aria-label": e.label ?? M(r)("ui.breadcrumb.label"),
|
|
1374
1387
|
class: y(M(X)("min-w-0 text-sm", i.class))
|
|
1375
|
-
}, [c("ol",
|
|
1388
|
+
}, [c("ol", Qr, [(w(!0), s(n, null, D(e.items, (t, n) => (w(), s("li", {
|
|
1376
1389
|
key: `${t.label}-${n}`,
|
|
1377
1390
|
class: "flex min-w-0 items-center gap-1.5"
|
|
1378
1391
|
}, [n === e.items.length - 1 ? (w(), s("span", {
|
|
1379
1392
|
key: 0,
|
|
1380
1393
|
"aria-current": "page",
|
|
1381
1394
|
title: t.label,
|
|
1382
|
-
class: y(M(X)(
|
|
1395
|
+
class: y(M(X)(ii, "text-black"))
|
|
1383
1396
|
}, [t.icon ? (w(), a(k(t.icon), {
|
|
1384
1397
|
key: 0,
|
|
1385
1398
|
"aria-hidden": "true"
|
|
1386
|
-
})) : o("", !0), c("span",
|
|
1399
|
+
})) : o("", !0), c("span", ei, j(t.label), 1)], 10, $r)) : u(t) ? (w(), a(k(u(t)), _({
|
|
1387
1400
|
key: 1,
|
|
1388
1401
|
ref_for: !0
|
|
1389
1402
|
}, d(t), {
|
|
1390
1403
|
title: t.label,
|
|
1391
|
-
class: M(X)(
|
|
1404
|
+
class: M(X)(ii, p),
|
|
1392
1405
|
onClick: (e) => f(t, e)
|
|
1393
1406
|
}), {
|
|
1394
1407
|
default: V(() => [t.icon ? (w(), a(k(t.icon), {
|
|
1395
1408
|
key: 0,
|
|
1396
1409
|
"aria-hidden": "true"
|
|
1397
|
-
})) : o("", !0), c("span",
|
|
1410
|
+
})) : o("", !0), c("span", ti, j(t.label), 1)]),
|
|
1398
1411
|
_: 2
|
|
1399
1412
|
}, 1040, [
|
|
1400
1413
|
"title",
|
|
@@ -1403,17 +1416,17 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1403
1416
|
])) : (w(), s("span", {
|
|
1404
1417
|
key: 2,
|
|
1405
1418
|
title: t.label,
|
|
1406
|
-
class: y(M(X)(
|
|
1419
|
+
class: y(M(X)(ii, "text-black/65"))
|
|
1407
1420
|
}, [t.icon ? (w(), a(k(t.icon), {
|
|
1408
1421
|
key: 0,
|
|
1409
1422
|
"aria-hidden": "true"
|
|
1410
|
-
})) : o("", !0), c("span",
|
|
1423
|
+
})) : o("", !0), c("span", ri, j(t.label), 1)], 10, ni)), n < e.items.length - 1 ? (w(), a(M(fe), {
|
|
1411
1424
|
key: 3,
|
|
1412
1425
|
"aria-hidden": "true",
|
|
1413
1426
|
class: "size-3.5 shrink-0 text-black/40"
|
|
1414
|
-
})) : o("", !0)]))), 128))])], 10,
|
|
1427
|
+
})) : o("", !0)]))), 128))])], 10, Zr));
|
|
1415
1428
|
}
|
|
1416
|
-
}),
|
|
1429
|
+
}), oi = /* @__PURE__ */ f({
|
|
1417
1430
|
__name: "Menu",
|
|
1418
1431
|
props: {
|
|
1419
1432
|
items: {},
|
|
@@ -1491,18 +1504,18 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1491
1504
|
_: 1
|
|
1492
1505
|
}));
|
|
1493
1506
|
}
|
|
1494
|
-
}),
|
|
1507
|
+
}), si = { class: "flex flex-wrap items-start justify-between gap-x-6 gap-y-3" }, ci = { class: "flex min-w-0 flex-col gap-1" }, li = { class: "flex flex-wrap items-center gap-x-2 gap-y-1" }, ui = ["aria-label"], di = {
|
|
1495
1508
|
key: 0,
|
|
1496
1509
|
class: "flex shrink-0 items-center gap-2 px-3 text-sm font-bold",
|
|
1497
1510
|
"aria-live": "polite"
|
|
1498
|
-
},
|
|
1511
|
+
}, fi = {
|
|
1499
1512
|
"aria-hidden": "true",
|
|
1500
1513
|
inert: "",
|
|
1501
1514
|
class: "invisible absolute top-0 left-0 size-0 overflow-hidden"
|
|
1502
|
-
},
|
|
1515
|
+
}, pi = {
|
|
1503
1516
|
key: 1,
|
|
1504
1517
|
class: "flex shrink-0 items-center gap-2 px-3 text-sm"
|
|
1505
|
-
},
|
|
1518
|
+
}, mi = /* @__PURE__ */ f({
|
|
1506
1519
|
__name: "PageHeader",
|
|
1507
1520
|
props: {
|
|
1508
1521
|
title: {},
|
|
@@ -1545,12 +1558,12 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1545
1558
|
}), S(() => x?.disconnect()), z(() => r.toolbar?.map((e) => `${e.label}${e.disabled ? "-" : ""}`).join("|"), () => v(b));
|
|
1546
1559
|
let T = i(() => (r.toolbar ?? []).slice(0, _.value)), A = i(() => (r.toolbar ?? []).slice(_.value));
|
|
1547
1560
|
return (i, p) => (w(), s("header", { class: y(M(X)("flex flex-col gap-2", r.class)) }, [
|
|
1548
|
-
e.breadcrumb && e.breadcrumb.length > 1 ? (w(), a(
|
|
1561
|
+
e.breadcrumb && e.breadcrumb.length > 1 ? (w(), a(ai, {
|
|
1549
1562
|
key: 0,
|
|
1550
1563
|
items: e.breadcrumb,
|
|
1551
1564
|
"link-component": e.linkComponent
|
|
1552
1565
|
}, null, 8, ["items", "link-component"])) : o("", !0),
|
|
1553
|
-
c("div",
|
|
1566
|
+
c("div", si, [c("div", ci, [c("div", li, [c("h1", { class: y(M(X)("min-w-0 text-2xl font-bold break-words", e.ui?.title)) }, j(e.title), 3), O(i.$slots, "badge")]), e.description || i.$slots.description ? (w(), s("p", {
|
|
1554
1567
|
key: 0,
|
|
1555
1568
|
class: y(M(X)("max-w-prose text-sm text-black/65", e.ui?.description))
|
|
1556
1569
|
}, [O(i.$slots, "description", {}, () => [u(j(e.description), 1)])], 2)) : o("", !0)]), i.$slots.actions ? (w(), s("div", {
|
|
@@ -1563,7 +1576,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1563
1576
|
"aria-label": M(t)("ui.pageHeader.actions", { title: e.title }),
|
|
1564
1577
|
class: y(M(X)("flex items-center gap-1 rounded-lg border border-black/15 bg-white p-1", e.ui?.toolbar))
|
|
1565
1578
|
}, [
|
|
1566
|
-
i.$slots["toolbar-start"] ? (w(), s("div",
|
|
1579
|
+
i.$slots["toolbar-start"] ? (w(), s("div", di, [O(i.$slots, "toolbar-start")])) : o("", !0),
|
|
1567
1580
|
c("div", {
|
|
1568
1581
|
ref_key: "fitArea",
|
|
1569
1582
|
ref: h,
|
|
@@ -1592,7 +1605,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1592
1605
|
"disabled",
|
|
1593
1606
|
"onClick"
|
|
1594
1607
|
]))), 128)),
|
|
1595
|
-
A.value.length ? (w(), a(
|
|
1608
|
+
A.value.length ? (w(), a(oi, {
|
|
1596
1609
|
key: 0,
|
|
1597
1610
|
items: A.value,
|
|
1598
1611
|
label: M(t)("ui.pageHeader.moreActions"),
|
|
@@ -1603,7 +1616,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1603
1616
|
"label",
|
|
1604
1617
|
"link-component"
|
|
1605
1618
|
])) : o("", !0),
|
|
1606
|
-
c("div",
|
|
1619
|
+
c("div", fi, [c("div", {
|
|
1607
1620
|
ref_key: "measure",
|
|
1608
1621
|
ref: g,
|
|
1609
1622
|
class: "flex w-max gap-1"
|
|
@@ -1629,18 +1642,18 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1629
1642
|
_: 1
|
|
1630
1643
|
})], 512)])
|
|
1631
1644
|
], 512),
|
|
1632
|
-
i.$slots["toolbar-end"] ? (w(), s("div",
|
|
1633
|
-
], 10,
|
|
1645
|
+
i.$slots["toolbar-end"] ? (w(), s("div", pi, [O(i.$slots, "toolbar-end")])) : o("", !0)
|
|
1646
|
+
], 10, ui)) : o("", !0),
|
|
1634
1647
|
O(i.$slots, "default")
|
|
1635
1648
|
], 2));
|
|
1636
1649
|
}
|
|
1637
|
-
}),
|
|
1650
|
+
}), hi = { class: "flex min-w-0 flex-col gap-0.5" }, gi = {
|
|
1638
1651
|
class: "text-sm",
|
|
1639
1652
|
"aria-hidden": "true"
|
|
1640
|
-
},
|
|
1653
|
+
}, _i = {
|
|
1641
1654
|
key: 0,
|
|
1642
1655
|
class: "text-xs text-black/65"
|
|
1643
|
-
},
|
|
1656
|
+
}, vi = { class: "w-full shrink-0 sm:w-80" }, yi = /* @__PURE__ */ f({
|
|
1644
1657
|
__name: "SettingsRow",
|
|
1645
1658
|
props: {
|
|
1646
1659
|
label: {},
|
|
@@ -1655,12 +1668,12 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1655
1668
|
},
|
|
1656
1669
|
setup(e) {
|
|
1657
1670
|
let t = e;
|
|
1658
|
-
return (n, r) => (w(), s("div", { class: y(M(X)("flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-6", t.class)) }, [c("div",
|
|
1671
|
+
return (n, r) => (w(), s("div", { class: y(M(X)("flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-6", t.class)) }, [c("div", hi, [c("p", gi, j(e.label), 1), e.description ? (w(), s("p", _i, j(e.description), 1)) : o("", !0)]), c("div", vi, [O(n.$slots, "default")])], 2));
|
|
1659
1672
|
}
|
|
1660
|
-
}),
|
|
1673
|
+
}), bi = ["aria-label"], xi = ["aria-label"], Si = { "aria-hidden": "true" }, Ci = { class: "flex max-h-72 flex-col gap-2 overflow-y-auto p-3 text-sm [scrollbar-width:thin]" }, wi = { class: "min-w-0 truncate" }, Ti = {
|
|
1661
1674
|
key: 0,
|
|
1662
1675
|
class: "ml-auto shrink-0 truncate text-xs text-black/65"
|
|
1663
|
-
},
|
|
1676
|
+
}, Ei = /* @__PURE__ */ f({
|
|
1664
1677
|
__name: "AvatarGroup",
|
|
1665
1678
|
props: {
|
|
1666
1679
|
users: {},
|
|
@@ -1728,7 +1741,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1728
1741
|
},
|
|
1729
1742
|
ui: { content: "w-56" }
|
|
1730
1743
|
}, {
|
|
1731
|
-
content: V(() => [c("ul",
|
|
1744
|
+
content: V(() => [c("ul", Ci, [(w(!0), s(n, null, D(l.value, (e, t) => (w(), s("li", {
|
|
1732
1745
|
key: `${e.name}-${t}`,
|
|
1733
1746
|
class: "flex items-center gap-2"
|
|
1734
1747
|
}, [
|
|
@@ -1737,8 +1750,8 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1737
1750
|
size: "xs",
|
|
1738
1751
|
decorative: ""
|
|
1739
1752
|
}, null, 8, ["user"]),
|
|
1740
|
-
c("span",
|
|
1741
|
-
e.role ? (w(), s("span",
|
|
1753
|
+
c("span", wi, j(e.name), 1),
|
|
1754
|
+
e.role ? (w(), s("span", Ti, j(e.role), 1)) : o("", !0)
|
|
1742
1755
|
]))), 128))])]),
|
|
1743
1756
|
default: V(() => [c("button", {
|
|
1744
1757
|
type: "button",
|
|
@@ -1747,17 +1760,17 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1747
1760
|
names: l.value.map((e) => e.name).join(", ")
|
|
1748
1761
|
}),
|
|
1749
1762
|
class: y(M(X)("inline-flex shrink-0 cursor-pointer items-center justify-center rounded-full bg-surface font-bold text-black select-none", "outline-2 outline-offset-1 outline-transparent transition focus-visible:outline-focus", p[e.size]))
|
|
1750
|
-
}, [c("span",
|
|
1763
|
+
}, [c("span", Si, "+" + j(l.value.length), 1)], 10, xi)]),
|
|
1751
1764
|
_: 1
|
|
1752
|
-
})], 2)) : o("", !0)], 10,
|
|
1765
|
+
})], 2)) : o("", !0)], 10, bi));
|
|
1753
1766
|
}
|
|
1754
|
-
}),
|
|
1767
|
+
}), Di = { class: "flex min-w-0 flex-col gap-1" }, Oi = {
|
|
1755
1768
|
key: 1,
|
|
1756
1769
|
class: "text-sm text-black/65"
|
|
1757
|
-
},
|
|
1770
|
+
}, ki = {
|
|
1758
1771
|
key: 0,
|
|
1759
1772
|
class: "flex shrink-0 items-center gap-2"
|
|
1760
|
-
},
|
|
1773
|
+
}, Ai = /* @__PURE__ */ f({
|
|
1761
1774
|
__name: "Card",
|
|
1762
1775
|
props: {
|
|
1763
1776
|
title: {},
|
|
@@ -1791,25 +1804,25 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1791
1804
|
default: V(() => [c("div", { class: y(M(X)("flex min-w-0 flex-1 flex-col gap-4", l[e.padding], e.ui?.body)) }, [e.title || e.description || i.$slots.header || i.$slots.actions ? (w(), s("div", {
|
|
1792
1805
|
key: 0,
|
|
1793
1806
|
class: y(M(X)("flex items-start justify-between gap-3", e.padding === "none" && "px-4 pt-4 sm:px-6 sm:pt-6", e.ui?.header))
|
|
1794
|
-
}, [O(i.$slots, "header", {}, () => [c("div",
|
|
1807
|
+
}, [O(i.$slots, "header", {}, () => [c("div", Di, [e.title ? (w(), a(k(`h${e.headingLevel}`), {
|
|
1795
1808
|
key: 0,
|
|
1796
1809
|
id: n,
|
|
1797
1810
|
class: "text-base font-bold"
|
|
1798
1811
|
}, {
|
|
1799
1812
|
default: V(() => [u(j(e.title), 1)]),
|
|
1800
1813
|
_: 1
|
|
1801
|
-
})) : o("", !0), e.description ? (w(), s("p",
|
|
1814
|
+
})) : o("", !0), e.description ? (w(), s("p", Oi, j(e.description), 1)) : o("", !0)])]), i.$slots.actions ? (w(), s("div", ki, [O(i.$slots, "actions")])) : o("", !0)], 2)) : o("", !0), O(i.$slots, "default")], 2), i.$slots.footer ? (w(), s("div", {
|
|
1802
1815
|
key: 0,
|
|
1803
1816
|
class: y(M(X)("flex flex-wrap justify-end gap-2 border-t border-black/15", d[e.padding], e.ui?.footer))
|
|
1804
1817
|
}, [O(i.$slots, "footer")], 2)) : o("", !0)]),
|
|
1805
1818
|
_: 3
|
|
1806
1819
|
}, 8, ["aria-labelledby", "class"]));
|
|
1807
1820
|
}
|
|
1808
|
-
}),
|
|
1821
|
+
}), ji = { class: "min-w-0 truncate" }, Mi = [
|
|
1809
1822
|
"tabindex",
|
|
1810
1823
|
"aria-label",
|
|
1811
1824
|
"disabled"
|
|
1812
|
-
],
|
|
1825
|
+
], Ni = /* @__PURE__ */ f({
|
|
1813
1826
|
__name: "Chip",
|
|
1814
1827
|
props: {
|
|
1815
1828
|
size: { default: "md" },
|
|
@@ -1842,7 +1855,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1842
1855
|
};
|
|
1843
1856
|
return (t, p) => (w(), s("span", { class: y(M(X)(a, l[e.size], e.removable && u[e.size], e.disabled && "opacity-40", r.class)) }, [
|
|
1844
1857
|
O(t.$slots, "leading"),
|
|
1845
|
-
c("span",
|
|
1858
|
+
c("span", ji, [O(t.$slots, "default")]),
|
|
1846
1859
|
e.removable ? (w(), s("button", {
|
|
1847
1860
|
key: 0,
|
|
1848
1861
|
type: "button",
|
|
@@ -1851,10 +1864,10 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1851
1864
|
disabled: e.disabled,
|
|
1852
1865
|
class: y(M(X)("flex shrink-0 cursor-pointer items-center justify-center rounded-sm transition", "not-disabled:hover:bg-black/10 not-disabled:active:bg-black/15 disabled:cursor-not-allowed", "outline-2 outline-offset-0 outline-transparent focus-visible:outline-focus", f[e.size])),
|
|
1853
1866
|
onClick: p[0] ||= (e) => i("remove")
|
|
1854
|
-
}, [d(M(Pe), { "aria-hidden": "true" })], 10,
|
|
1867
|
+
}, [d(M(Pe), { "aria-hidden": "true" })], 10, Mi)) : o("", !0)
|
|
1855
1868
|
], 2));
|
|
1856
1869
|
}
|
|
1857
|
-
}),
|
|
1870
|
+
}), Pi = ["role", "aria-label"], Fi = { class: "shrink-0" }, Ii = /* @__PURE__ */ f({
|
|
1858
1871
|
__name: "Divider",
|
|
1859
1872
|
props: {
|
|
1860
1873
|
orientation: { default: "horizontal" },
|
|
@@ -1883,12 +1896,12 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1883
1896
|
"aria-hidden": "true",
|
|
1884
1897
|
class: "h-px flex-1 bg-black/15"
|
|
1885
1898
|
}, null, -1),
|
|
1886
|
-
c("span",
|
|
1899
|
+
c("span", Fi, [O(n.$slots, "default", {}, () => [u(j(e.label), 1)])]),
|
|
1887
1900
|
r[1] ||= c("span", {
|
|
1888
1901
|
"aria-hidden": "true",
|
|
1889
1902
|
class: "h-px flex-1 bg-black/15"
|
|
1890
1903
|
}, null, -1)
|
|
1891
|
-
], 10,
|
|
1904
|
+
], 10, Pi)) : (w(), a(M(Qt), {
|
|
1892
1905
|
key: 1,
|
|
1893
1906
|
orientation: e.orientation,
|
|
1894
1907
|
decorative: e.decorative,
|
|
@@ -1899,7 +1912,51 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1899
1912
|
"class"
|
|
1900
1913
|
]));
|
|
1901
1914
|
}
|
|
1902
|
-
})
|
|
1915
|
+
});
|
|
1916
|
+
// src/components/ChangeIndicator/changeIndicator.ts
|
|
1917
|
+
function Li(e, t) {
|
|
1918
|
+
return t ? `${e} ${t}` : String(e);
|
|
1919
|
+
}
|
|
1920
|
+
function Ri(e, t) {
|
|
1921
|
+
return String(e) !== String(t);
|
|
1922
|
+
}
|
|
1923
|
+
// src/components/ChangeIndicator/ChangeIndicator.vue?vue&type=script&setup=true&lang.ts
|
|
1924
|
+
var zi = { class: "sr-only" }, Bi = {
|
|
1925
|
+
"aria-hidden": "true",
|
|
1926
|
+
class: "font-normal line-through decoration-blue/60"
|
|
1927
|
+
}, Vi = { "aria-hidden": "true" }, Hi = /* @__PURE__ */ f({
|
|
1928
|
+
__name: "ChangeIndicator",
|
|
1929
|
+
props: {
|
|
1930
|
+
from: {},
|
|
1931
|
+
to: {},
|
|
1932
|
+
unit: {},
|
|
1933
|
+
class: { type: [
|
|
1934
|
+
Boolean,
|
|
1935
|
+
null,
|
|
1936
|
+
String,
|
|
1937
|
+
Object,
|
|
1938
|
+
Array
|
|
1939
|
+
] }
|
|
1940
|
+
},
|
|
1941
|
+
setup(e) {
|
|
1942
|
+
let { t } = K(), r = e, a = i(() => Ri(r.from, r.to)), l = i(() => t("ui.changeIndicator.changed", {
|
|
1943
|
+
from: r.from,
|
|
1944
|
+
to: Li(r.to, r.unit)
|
|
1945
|
+
}));
|
|
1946
|
+
return (t, i) => a.value ? (w(), s("span", {
|
|
1947
|
+
key: 0,
|
|
1948
|
+
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))
|
|
1949
|
+
}, [
|
|
1950
|
+
c("span", zi, j(l.value), 1),
|
|
1951
|
+
c("span", Bi, j(e.from), 1),
|
|
1952
|
+
d(M(ne), {
|
|
1953
|
+
"aria-hidden": "true",
|
|
1954
|
+
class: "size-3 shrink-0"
|
|
1955
|
+
}),
|
|
1956
|
+
c("span", Vi, [u(j(e.to), 1), e.unit ? (w(), s(n, { key: 0 }, [u(j(e.unit), 1)], 64)) : o("", !0)])
|
|
1957
|
+
], 2)) : o("", !0);
|
|
1958
|
+
}
|
|
1959
|
+
}), Ui = ["aria-label"], Wi = { class: "max-w-64 px-3 py-2 text-xs" }, Gi = /* @__PURE__ */ f({
|
|
1903
1960
|
__name: "InfoTip",
|
|
1904
1961
|
props: {
|
|
1905
1962
|
text: {},
|
|
@@ -1921,7 +1978,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1921
1978
|
sideOffset: 6
|
|
1922
1979
|
}
|
|
1923
1980
|
}, {
|
|
1924
|
-
content: V(() => [c("p",
|
|
1981
|
+
content: V(() => [c("p", Wi, j(e.text), 1)]),
|
|
1925
1982
|
default: V(() => [c("button", {
|
|
1926
1983
|
type: "button",
|
|
1927
1984
|
"aria-label": e.label,
|
|
@@ -1930,11 +1987,11 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1930
1987
|
}, [d(M(_e), { "aria-hidden": "true" }), c("span", {
|
|
1931
1988
|
id: n,
|
|
1932
1989
|
hidden: ""
|
|
1933
|
-
}, j(e.text), 1)], 10,
|
|
1990
|
+
}, j(e.text), 1)], 10, Ui)]),
|
|
1934
1991
|
_: 1
|
|
1935
1992
|
}));
|
|
1936
1993
|
}
|
|
1937
|
-
}),
|
|
1994
|
+
}), Ki = { class: "overflow-hidden" }, qi = ["id"], Ji = /* @__PURE__ */ f({
|
|
1938
1995
|
__name: "FieldMessage",
|
|
1939
1996
|
props: {
|
|
1940
1997
|
id: {},
|
|
@@ -1957,7 +2014,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1957
2014
|
return (t, i) => (w(), s(n, null, [c("div", {
|
|
1958
2015
|
"aria-hidden": "true",
|
|
1959
2016
|
class: y(M(X)("-mt-1.5 grid transition-[grid-template-rows,visibility] duration-150 ease-out motion-reduce:transition-none", r.value ? "grid-rows-[1fr]" : "invisible grid-rows-[0fr] delay-100"))
|
|
1960
|
-
}, [c("div",
|
|
2017
|
+
}, [c("div", Ki, [c("p", { class: y(M(X)("flex items-center gap-1 pt-1.5 text-xs transition-[translate,opacity,color] ease-out motion-reduce:transition-none [&_svg]:size-3.5 [&_svg]:shrink-0", d.value && f[d.value], r.value ? "duration-150 delay-100" : "-translate-y-1 opacity-0 duration-100")) }, [d.value === "loading" ? (w(), a(Rn, {
|
|
1961
2018
|
key: 0,
|
|
1962
2019
|
size: "sm",
|
|
1963
2020
|
class: "size-3.5"
|
|
@@ -1965,12 +2022,12 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1965
2022
|
id: e.id,
|
|
1966
2023
|
"aria-live": "polite",
|
|
1967
2024
|
class: "sr-only"
|
|
1968
|
-
}, j(e.text), 9,
|
|
2025
|
+
}, j(e.text), 9, qi)], 64));
|
|
1969
2026
|
}
|
|
1970
|
-
}),
|
|
2027
|
+
}), Yi = { class: "flex items-center gap-1" }, Xi = ["hidden"], Zi = {
|
|
1971
2028
|
key: 0,
|
|
1972
2029
|
class: "col-start-2 row-start-1 flex h-5 items-center text-xs"
|
|
1973
|
-
},
|
|
2030
|
+
}, Qi = "input, textarea, [role=\"spinbutton\"], [contenteditable=\"true\"]", $i = /* @__PURE__ */ f({
|
|
1974
2031
|
__name: "FormField",
|
|
1975
2032
|
props: {
|
|
1976
2033
|
label: {},
|
|
@@ -1993,7 +2050,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1993
2050
|
let { t } = K(), n = e, r = P(), l = `${r}-control`, u = `${r}-label`, f = `${r}-helper`, p = `${r}-status`, m = i(() => n.errorText ? "error" : n.status), h = i(() => n.errorText || n.statusText), g = i(() => [n.helper && f, h.value && p].filter(Boolean).join(" ") || void 0);
|
|
1994
2051
|
function _(e) {
|
|
1995
2052
|
let t = e.target;
|
|
1996
|
-
n.disabled || t.closest(`${
|
|
2053
|
+
n.disabled || t.closest(`${Qi}, button`) || (e.preventDefault(), e.currentTarget.querySelector(Qi)?.focus());
|
|
1997
2054
|
}
|
|
1998
2055
|
function v() {
|
|
1999
2056
|
let e = document.getElementById(l);
|
|
@@ -2011,12 +2068,12 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2011
2068
|
loading: ""
|
|
2012
2069
|
};
|
|
2013
2070
|
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", n.class)) }, [c("div", { class: y(M(X)("grid grid-cols-[minmax(0,1fr)_auto]", !e.hideLabel && "gap-y-1.5", r.$slots["label-trailing"] && "gap-x-3")) }, [
|
|
2014
|
-
c("div", { class: y(M(X)("col-start-1 row-start-1 flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div",
|
|
2071
|
+
c("div", { class: y(M(X)("col-start-1 row-start-1 flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div", Yi, [c("label", {
|
|
2015
2072
|
id: u,
|
|
2016
2073
|
for: l,
|
|
2017
2074
|
class: "text-sm",
|
|
2018
2075
|
onClick: v
|
|
2019
|
-
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(
|
|
2076
|
+
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(Gi, {
|
|
2020
2077
|
key: 0,
|
|
2021
2078
|
text: e.helper,
|
|
2022
2079
|
label: M(t)("ui.formField.about", { label: e.label })
|
|
@@ -2025,7 +2082,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2025
2082
|
id: f,
|
|
2026
2083
|
hidden: e.helperPlacement === "icon",
|
|
2027
2084
|
class: "text-xs text-black/65"
|
|
2028
|
-
}, j(e.helper), 9,
|
|
2085
|
+
}, j(e.helper), 9, Xi)) : o("", !0)], 2),
|
|
2029
2086
|
c("div", {
|
|
2030
2087
|
class: y(M(X)(b, "col-span-2 row-start-2", m.value && x[m.value], e.disabled && "opacity-40 cursor-not-allowed")),
|
|
2031
2088
|
onPointerdown: _
|
|
@@ -2039,19 +2096,19 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2039
2096
|
}),
|
|
2040
2097
|
O(r.$slots, "trailing")
|
|
2041
2098
|
], 34),
|
|
2042
|
-
r.$slots["label-trailing"] ? (w(), s("div",
|
|
2043
|
-
], 2), d(
|
|
2099
|
+
r.$slots["label-trailing"] ? (w(), s("div", Zi, [O(r.$slots, "label-trailing")])) : o("", !0)
|
|
2100
|
+
], 2), d(Ji, {
|
|
2044
2101
|
id: p,
|
|
2045
2102
|
status: m.value,
|
|
2046
2103
|
text: h.value
|
|
2047
2104
|
}, null, 8, ["status", "text"])], 2));
|
|
2048
2105
|
}
|
|
2049
|
-
}),
|
|
2106
|
+
}), ea = [
|
|
2050
2107
|
"id",
|
|
2051
2108
|
"disabled",
|
|
2052
2109
|
"aria-invalid",
|
|
2053
2110
|
"aria-describedby"
|
|
2054
|
-
],
|
|
2111
|
+
], ta = /* @__PURE__ */ f({
|
|
2055
2112
|
inheritAttrs: !1,
|
|
2056
2113
|
__name: "Input",
|
|
2057
2114
|
props: /*@__PURE__*/ g({
|
|
@@ -2083,7 +2140,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2083
2140
|
if (n.maxLength !== void 0 && e > n.maxLength) return t("ui.input.maxLength", { count: n.maxLength });
|
|
2084
2141
|
if (o.value && n.minLength !== void 0 && e > 0 && e < n.minLength) return t("ui.input.minLength", { count: n.minLength });
|
|
2085
2142
|
}), u = i(() => n.status ?? (s.value ? "error" : void 0)), d = i(() => n.statusText ?? s.value);
|
|
2086
|
-
return (t, i) => (w(), a(
|
|
2143
|
+
return (t, i) => (w(), a($i, {
|
|
2087
2144
|
label: e.label,
|
|
2088
2145
|
helper: e.helper,
|
|
2089
2146
|
"helper-placement": e.helperPlacement,
|
|
@@ -2103,7 +2160,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2103
2160
|
"aria-describedby": a,
|
|
2104
2161
|
class: "h-5 min-w-0 flex-1 bg-transparent outline-none placeholder:text-black/55 disabled:cursor-not-allowed",
|
|
2105
2162
|
onBlur: i[1] ||= (e) => o.value = !0
|
|
2106
|
-
}), null, 16,
|
|
2163
|
+
}), null, 16, ea), [[L, r.value]])]),
|
|
2107
2164
|
_: 2
|
|
2108
2165
|
}, [t.$slots.leading ? {
|
|
2109
2166
|
name: "leading",
|
|
@@ -2125,7 +2182,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2125
2182
|
"class"
|
|
2126
2183
|
]));
|
|
2127
2184
|
}
|
|
2128
|
-
}),
|
|
2185
|
+
}), na = "-ml-3 rounded-l border-r border-black/15", ra = "-mr-3 rounded-r border-l border-black/15", ia = /* @__PURE__ */ f({
|
|
2129
2186
|
inheritAttrs: !1,
|
|
2130
2187
|
__name: "InputNumber",
|
|
2131
2188
|
props: /*@__PURE__*/ g({
|
|
@@ -2160,7 +2217,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2160
2217
|
"not-disabled:hover:brightness-90 not-disabled:active:brightness-80 [&_svg]:opacity-100!",
|
|
2161
2218
|
"disabled:cursor-not-allowed disabled:[&_svg]:opacity-40!"
|
|
2162
2219
|
];
|
|
2163
|
-
return (t, i) => (w(), a(
|
|
2220
|
+
return (t, i) => (w(), a($i, {
|
|
2164
2221
|
label: e.label,
|
|
2165
2222
|
helper: e.helper,
|
|
2166
2223
|
"helper-placement": e.helperPlacement,
|
|
@@ -2184,7 +2241,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2184
2241
|
class: "contents"
|
|
2185
2242
|
}, {
|
|
2186
2243
|
default: V(() => [
|
|
2187
|
-
d(M(Ct), { class: y([o,
|
|
2244
|
+
d(M(Ct), { class: y([o, na]) }, {
|
|
2188
2245
|
default: V(() => [d(M(De))]),
|
|
2189
2246
|
_: 1
|
|
2190
2247
|
}, 8, ["class"]),
|
|
@@ -2198,7 +2255,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2198
2255
|
"aria-describedby",
|
|
2199
2256
|
"aria-valuetext"
|
|
2200
2257
|
]),
|
|
2201
|
-
d(M(wt), { class: y([o,
|
|
2258
|
+
d(M(wt), { class: y([o, ra]) }, {
|
|
2202
2259
|
default: V(() => [d(M(Ae))]),
|
|
2203
2260
|
_: 1
|
|
2204
2261
|
}, 8, ["class"])
|
|
@@ -2227,26 +2284,26 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2227
2284
|
"class"
|
|
2228
2285
|
]));
|
|
2229
2286
|
}
|
|
2230
|
-
}),
|
|
2287
|
+
}), aa = { class: "flex items-center" }, oa = ["aria-label", "disabled"], sa = ["aria-label", "disabled"], ca = {
|
|
2231
2288
|
key: 2,
|
|
2232
2289
|
class: "px-1.5 py-1 text-sm tabular-nums"
|
|
2233
|
-
},
|
|
2290
|
+
}, la = {
|
|
2234
2291
|
key: 0,
|
|
2235
2292
|
class: "mt-3 grid w-56 grid-cols-3 gap-1"
|
|
2236
|
-
},
|
|
2293
|
+
}, ua = [
|
|
2237
2294
|
"aria-current",
|
|
2238
2295
|
"aria-pressed",
|
|
2239
2296
|
"disabled",
|
|
2240
2297
|
"onClick"
|
|
2241
|
-
],
|
|
2298
|
+
], da = {
|
|
2242
2299
|
key: 1,
|
|
2243
2300
|
class: "mt-3 grid w-56 grid-cols-3 gap-1"
|
|
2244
|
-
},
|
|
2301
|
+
}, fa = [
|
|
2245
2302
|
"aria-current",
|
|
2246
2303
|
"aria-pressed",
|
|
2247
2304
|
"disabled",
|
|
2248
2305
|
"onClick"
|
|
2249
|
-
],
|
|
2306
|
+
], pa = /* @__PURE__ */ f({
|
|
2250
2307
|
__name: "Calendar",
|
|
2251
2308
|
props: /*@__PURE__*/ g({
|
|
2252
2309
|
min: {},
|
|
@@ -2321,25 +2378,25 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2321
2378
|
let H = i(() => _.value === "months" ? B(v.value.year - 1) : B(T.value - 1)), U = i(() => _.value === "months" ? B(v.value.year + 1) : B(T.value + 12)), ee = (e) => p.value?.year === v.value.year && p.value?.month === e, W = (e) => p.value?.year === e, G = (e) => {
|
|
2322
2379
|
let t = Cn(vn());
|
|
2323
2380
|
return v.value.year === t.year && e === t.month;
|
|
2324
|
-
},
|
|
2381
|
+
}, q = (e) => e === Cn(vn()).year, J = [
|
|
2325
2382
|
"inline-flex items-center gap-0.5 rounded px-1.5 py-1 text-sm cursor-pointer transition",
|
|
2326
2383
|
"hover:bg-black/10 active:bg-black/15 [&_svg]:size-3.5",
|
|
2327
2384
|
"disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
2328
2385
|
"outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus"
|
|
2329
|
-
],
|
|
2386
|
+
], te = [
|
|
2330
2387
|
"relative aria-[current=date]:font-bold",
|
|
2331
2388
|
"aria-[current=date]:after:absolute aria-[current=date]:after:left-1/2 aria-[current=date]:after:size-1",
|
|
2332
2389
|
"aria-[current=date]:after:-translate-x-1/2 aria-[current=date]:after:rounded-full aria-[current=date]:after:bg-current"
|
|
2333
|
-
],
|
|
2334
|
-
...
|
|
2390
|
+
], ne = [
|
|
2391
|
+
...te,
|
|
2335
2392
|
"aria-[current=date]:after:bottom-2",
|
|
2336
2393
|
"flex h-12 items-center justify-center rounded text-sm tabular-nums cursor-pointer transition",
|
|
2337
2394
|
"hover:bg-black/10",
|
|
2338
2395
|
"aria-pressed:bg-primary aria-pressed:text-white aria-pressed:hover:bg-primary",
|
|
2339
2396
|
"disabled:cursor-not-allowed disabled:text-black/25 disabled:hover:bg-transparent",
|
|
2340
2397
|
"outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus"
|
|
2341
|
-
],
|
|
2342
|
-
...
|
|
2398
|
+
], re = [
|
|
2399
|
+
...te,
|
|
2343
2400
|
"aria-[current=date]:after:bottom-0.5",
|
|
2344
2401
|
"flex size-8 items-center justify-center rounded text-sm tabular-nums cursor-pointer transition",
|
|
2345
2402
|
"hover:bg-black/10",
|
|
@@ -2392,21 +2449,21 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2392
2449
|
default: V(() => [d(M(de))]),
|
|
2393
2450
|
_: 1
|
|
2394
2451
|
}, 8, ["aria-label", "disabled"])),
|
|
2395
|
-
c("div",
|
|
2452
|
+
c("div", aa, [_.value === "days" ? (w(), s("button", {
|
|
2396
2453
|
key: 0,
|
|
2397
2454
|
type: "button",
|
|
2398
|
-
class: y(
|
|
2455
|
+
class: y(J),
|
|
2399
2456
|
"aria-label": M(t)("ui.calendar.chooseMonth"),
|
|
2400
2457
|
disabled: e.disabled,
|
|
2401
2458
|
onClick: k
|
|
2402
|
-
}, [u(j(C.value) + " ", 1), d(M(ue))], 8,
|
|
2459
|
+
}, [u(j(C.value) + " ", 1), d(M(ue))], 8, oa)) : o("", !0), _.value === "years" ? (w(), s("span", ca, j(O.value[0]) + " – " + j(O.value[O.value.length - 1]), 1)) : (w(), s("button", {
|
|
2403
2460
|
key: 1,
|
|
2404
2461
|
type: "button",
|
|
2405
|
-
class: y(
|
|
2462
|
+
class: y(J),
|
|
2406
2463
|
"aria-label": M(t)("ui.calendar.chooseYear"),
|
|
2407
2464
|
disabled: e.disabled,
|
|
2408
2465
|
onClick: N
|
|
2409
|
-
}, [u(j(v.value.year) + " ", 1), d(M(ue))], 8,
|
|
2466
|
+
}, [u(j(v.value.year) + " ", 1), d(M(ue))], 8, sa))]),
|
|
2410
2467
|
_.value === "days" ? (w(), a(M(Ue), {
|
|
2411
2468
|
key: 2,
|
|
2412
2469
|
"as-child": ""
|
|
@@ -2436,23 +2493,23 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2436
2493
|
]),
|
|
2437
2494
|
_: 1
|
|
2438
2495
|
}),
|
|
2439
|
-
_.value === "months" ? (w(), s("div",
|
|
2496
|
+
_.value === "months" ? (w(), s("div", la, [(w(!0), s(n, null, D(S.value, (e, t) => (w(), s("button", {
|
|
2440
2497
|
key: e,
|
|
2441
2498
|
type: "button",
|
|
2442
|
-
class: y(
|
|
2499
|
+
class: y(ne),
|
|
2443
2500
|
"aria-current": G(t + 1) ? "date" : void 0,
|
|
2444
2501
|
"aria-pressed": ee(t + 1),
|
|
2445
2502
|
disabled: R(t + 1),
|
|
2446
2503
|
onClick: (e) => P(t + 1)
|
|
2447
|
-
}, j(e), 9,
|
|
2504
|
+
}, j(e), 9, ua))), 128))])) : _.value === "years" ? (w(), s("div", da, [(w(!0), s(n, null, D(O.value, (e) => (w(), s("button", {
|
|
2448
2505
|
key: e,
|
|
2449
2506
|
type: "button",
|
|
2450
|
-
class: y(
|
|
2451
|
-
"aria-current":
|
|
2507
|
+
class: y(ne),
|
|
2508
|
+
"aria-current": q(e) ? "date" : void 0,
|
|
2452
2509
|
"aria-pressed": W(e),
|
|
2453
2510
|
disabled: B(e),
|
|
2454
2511
|
onClick: (t) => I(e)
|
|
2455
|
-
}, j(e), 9,
|
|
2512
|
+
}, j(e), 9, fa))), 128))])) : o("", !0),
|
|
2456
2513
|
(w(!0), s(n, null, D(_.value === "days" ? i : [], (e) => (w(), a(M(Le), {
|
|
2457
2514
|
key: e.value.toString(),
|
|
2458
2515
|
class: "mt-3 border-collapse select-none"
|
|
@@ -2482,7 +2539,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2482
2539
|
day: t,
|
|
2483
2540
|
month: e.value,
|
|
2484
2541
|
"aria-current": M(yn)(t, M(vn)()) ? "date" : void 0,
|
|
2485
|
-
class: y(
|
|
2542
|
+
class: y(re)
|
|
2486
2543
|
}, null, 8, [
|
|
2487
2544
|
"day",
|
|
2488
2545
|
"month",
|
|
@@ -2509,7 +2566,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2509
2566
|
"class"
|
|
2510
2567
|
]));
|
|
2511
2568
|
}
|
|
2512
|
-
}),
|
|
2569
|
+
}), ma = {
|
|
2513
2570
|
monday: 1,
|
|
2514
2571
|
mon: 1,
|
|
2515
2572
|
tuesday: 2,
|
|
@@ -2528,7 +2585,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2528
2585
|
sat: 6,
|
|
2529
2586
|
sunday: 7,
|
|
2530
2587
|
sun: 7
|
|
2531
|
-
}, Q = `(${Object.keys(
|
|
2588
|
+
}, Q = `(${Object.keys(ma).join("|")})`, ha = {
|
|
2532
2589
|
january: 1,
|
|
2533
2590
|
jan: 1,
|
|
2534
2591
|
february: 2,
|
|
@@ -2553,7 +2610,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2553
2610
|
nov: 11,
|
|
2554
2611
|
december: 12,
|
|
2555
2612
|
dec: 12
|
|
2556
|
-
},
|
|
2613
|
+
}, ga = `(${Object.keys(ha).sort((e, t) => t.length - e.length).join("|")})`, _a = {
|
|
2557
2614
|
a: 1,
|
|
2558
2615
|
an: 1,
|
|
2559
2616
|
one: 1,
|
|
@@ -2577,7 +2634,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2577
2634
|
nineteen: 19,
|
|
2578
2635
|
twenty: 20,
|
|
2579
2636
|
thirty: 30
|
|
2580
|
-
},
|
|
2637
|
+
}, va = `(\\d+|${Object.keys(_a).join("|")})`, ya = "(day|week|fortnight|month|year)s?", ba = {
|
|
2581
2638
|
first: 1,
|
|
2582
2639
|
second: 2,
|
|
2583
2640
|
third: 3,
|
|
@@ -2599,37 +2656,37 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2599
2656
|
nineteenth: 19,
|
|
2600
2657
|
twentieth: 20,
|
|
2601
2658
|
thirtieth: 30
|
|
2602
|
-
},
|
|
2603
|
-
function
|
|
2659
|
+
}, xa = Object.keys(ba).join("|");
|
|
2660
|
+
function Sa(e) {
|
|
2604
2661
|
return new Date(e.year, e.month - 1, e.day).getDay() || 7;
|
|
2605
2662
|
}
|
|
2606
|
-
function
|
|
2607
|
-
return e.subtract({ days:
|
|
2663
|
+
function Ca(e) {
|
|
2664
|
+
return e.subtract({ days: Sa(e) - 1 });
|
|
2608
2665
|
}
|
|
2609
2666
|
function $(e, t, n) {
|
|
2610
2667
|
if (!Number.isInteger(e) || t < 1 || t > 12 || n < 1) return;
|
|
2611
2668
|
let r = new gn(e, t, 1);
|
|
2612
2669
|
if (!(n > r.calendar.getDaysInMonth(r))) return new gn(e, t, n);
|
|
2613
2670
|
}
|
|
2614
|
-
function
|
|
2671
|
+
function wa(e, t, n, r) {
|
|
2615
2672
|
if (r === -1) {
|
|
2616
2673
|
let r = _n(new gn(e, t, 1));
|
|
2617
|
-
return r.subtract({ days: (
|
|
2674
|
+
return r.subtract({ days: (Sa(r) - n + 7) % 7 });
|
|
2618
2675
|
}
|
|
2619
|
-
let i = new gn(e, t, 1), a = i.add({ days: (n -
|
|
2676
|
+
let i = new gn(e, t, 1), a = i.add({ days: (n - Sa(i) + 7) % 7 + (r - 1) * 7 });
|
|
2620
2677
|
return a.month === t ? a : void 0;
|
|
2621
2678
|
}
|
|
2622
|
-
function
|
|
2679
|
+
function Ta(e) {
|
|
2623
2680
|
let t = e % 19, n = Math.floor(e / 100), r = e % 100, i = Math.floor(n / 4), a = n % 4, o = Math.floor((n + 8) / 25), s = Math.floor((n - o + 1) / 3), c = (19 * t + n - i - s + 15) % 30, l = Math.floor(r / 4), u = r % 4, d = (32 + 2 * a + 2 * l - c - u) % 7, f = Math.floor((t + 11 * c + 22 * d) / 451), p = Math.floor((c + d - 7 * f + 114) / 31), m = (c + d - 7 * f + 114) % 31 + 1;
|
|
2624
2681
|
return new gn(e, p, m);
|
|
2625
2682
|
}
|
|
2626
|
-
function
|
|
2683
|
+
function Ea(e, t) {
|
|
2627
2684
|
if (e.length === 4) return Number(e);
|
|
2628
2685
|
if (e.length !== 2) return NaN;
|
|
2629
2686
|
let n = Number(e);
|
|
2630
2687
|
return n <= t.year % 100 ? 2e3 + n : 1900 + n;
|
|
2631
2688
|
}
|
|
2632
|
-
var
|
|
2689
|
+
var Da = [
|
|
2633
2690
|
["(?:christmas|xmas) eve", (e) => $(e, 12, 24)],
|
|
2634
2691
|
["(?:christmas|xmas)(?: day)?", (e) => $(e, 12, 25)],
|
|
2635
2692
|
["boxing day", (e) => $(e, 12, 26)],
|
|
@@ -2637,16 +2694,16 @@ var ba = [
|
|
|
2637
2694
|
["new years?(?: day)?", (e) => $(e, 1, 1)],
|
|
2638
2695
|
["valentines(?: day)?", (e) => $(e, 2, 14)],
|
|
2639
2696
|
["(?:st )?(?:patricks|paddys) day", (e) => $(e, 3, 17)],
|
|
2640
|
-
["good friday", (e) =>
|
|
2641
|
-
["easter monday", (e) =>
|
|
2642
|
-
["easter(?: sunday| day)?", (e) =>
|
|
2643
|
-
["(?:mothers day|mothering sunday)", (e) =>
|
|
2644
|
-
["fathers day", (e) =>
|
|
2697
|
+
["good friday", (e) => Ta(e).subtract({ days: 2 })],
|
|
2698
|
+
["easter monday", (e) => Ta(e).add({ days: 1 })],
|
|
2699
|
+
["easter(?: sunday| day)?", (e) => Ta(e)],
|
|
2700
|
+
["(?:mothers day|mothering sunday)", (e) => Ta(e).subtract({ weeks: 3 })],
|
|
2701
|
+
["fathers day", (e) => wa(e, 6, 7, 3)],
|
|
2645
2702
|
["halloween", (e) => $(e, 10, 31)],
|
|
2646
2703
|
["(?:bonfire night|guy fawkes(?: night| day)?)", (e) => $(e, 11, 5)],
|
|
2647
2704
|
["(?:remembrance|armistice) day", (e) => $(e, 11, 11)]
|
|
2648
2705
|
];
|
|
2649
|
-
function
|
|
2706
|
+
function Oa(e, t, n) {
|
|
2650
2707
|
let r = e.filter((e) => !!e).sort((e, t) => e.compare(t));
|
|
2651
2708
|
return n === "future" ? r.find((e) => e.compare(t) >= 0) : n === "past" ? [...r].reverse().find((e) => e.compare(t) <= 0) : r.reduce((e, n) => {
|
|
2652
2709
|
if (!e) return n;
|
|
@@ -2654,14 +2711,14 @@ function xa(e, t, n) {
|
|
|
2654
2711
|
return r < i || r === i && n.compare(t) > 0 ? n : e;
|
|
2655
2712
|
}, void 0);
|
|
2656
2713
|
}
|
|
2657
|
-
function
|
|
2714
|
+
function ka(e, t, n, r, i) {
|
|
2658
2715
|
if (!e) return n.yearValue === void 0 ? r.add(t) : void 0;
|
|
2659
2716
|
switch (e.kind) {
|
|
2660
2717
|
case "date": return n.yearValue === void 0 ? e.date.add(t) : void 0;
|
|
2661
2718
|
case "yearless": return n.yearValue === void 0 ? n.year || t.years ? e.resolve(r.year + t.years)?.add({
|
|
2662
2719
|
...t,
|
|
2663
2720
|
years: 0
|
|
2664
|
-
}) :
|
|
2721
|
+
}) : Oa(Array.from({ length: 9 }, (e, t) => r.year - 4 + t).map(e.resolve), r, i)?.add(t) : e.resolve(n.yearValue + t.years)?.add({
|
|
2665
2722
|
...t,
|
|
2666
2723
|
years: 0
|
|
2667
2724
|
});
|
|
@@ -2674,19 +2731,19 @@ function Sa(e, t, n, r, i) {
|
|
|
2674
2731
|
months: 0
|
|
2675
2732
|
});
|
|
2676
2733
|
}
|
|
2677
|
-
return
|
|
2734
|
+
return Oa([
|
|
2678
2735
|
-1,
|
|
2679
2736
|
0,
|
|
2680
2737
|
1
|
|
2681
2738
|
].map((e) => xn(r).add({ months: e })).map((t) => $(t.year, t.month, e.day)), r, i)?.add(t);
|
|
2682
2739
|
case "weekday": {
|
|
2683
2740
|
if (n.yearValue !== void 0) return;
|
|
2684
|
-
let a = (e.weekday -
|
|
2741
|
+
let a = (e.weekday - Sa(r) + 7) % 7 || 7, o = (Sa(r) - e.weekday + 7) % 7 || 7, s = r.add({ days: a }), c = r.subtract({ days: o });
|
|
2685
2742
|
return (i === "past" || i === "nearest" && o < a ? c : s).add(t);
|
|
2686
2743
|
}
|
|
2687
2744
|
}
|
|
2688
2745
|
}
|
|
2689
|
-
function
|
|
2746
|
+
function Aa(e, t, n) {
|
|
2690
2747
|
let r = e.trim(), i = /^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(r);
|
|
2691
2748
|
if (i) {
|
|
2692
2749
|
let e = $(Number(i[1]), Number(i[2]), Number(i[3]));
|
|
@@ -2712,29 +2769,29 @@ function Ca(e, t, n) {
|
|
|
2712
2769
|
kind: "yearless",
|
|
2713
2770
|
resolve: (e) => $(e, o, i)
|
|
2714
2771
|
};
|
|
2715
|
-
let s = $(
|
|
2772
|
+
let s = $(Ea(r.year, t), o, i);
|
|
2716
2773
|
return s && {
|
|
2717
2774
|
kind: "date",
|
|
2718
2775
|
date: s
|
|
2719
2776
|
};
|
|
2720
2777
|
}
|
|
2721
2778
|
let o = r.replace(/(\d)(st|nd|rd|th)\b/g, "$1").replace(/\bof\b/g, " ").replace(/[,/.\-]/g, " ").replace(/\s+/g, " ").trim(), s = (e, n, r) => {
|
|
2722
|
-
let i = Number(e), a =
|
|
2779
|
+
let i = Number(e), a = ha[n];
|
|
2723
2780
|
if (r === void 0) return {
|
|
2724
2781
|
kind: "yearless",
|
|
2725
2782
|
resolve: (e) => $(e, a, i)
|
|
2726
2783
|
};
|
|
2727
|
-
let o = $(
|
|
2784
|
+
let o = $(Ea(r, t), a, i);
|
|
2728
2785
|
return o && {
|
|
2729
2786
|
kind: "date",
|
|
2730
2787
|
date: o
|
|
2731
2788
|
};
|
|
2732
2789
|
}, c;
|
|
2733
|
-
if (c = RegExp(`^(\\d{1,2}) ${
|
|
2734
|
-
if (c = RegExp(`^${
|
|
2735
|
-
if (c = RegExp(`^(\\d{4}) ${
|
|
2736
|
-
if (c = RegExp(`^${
|
|
2737
|
-
let e =
|
|
2790
|
+
if (c = RegExp(`^(\\d{1,2}) ${ga}(?: (\\d{2}|\\d{4}))?$`).exec(o)) return s(c[1], c[2], c[3]);
|
|
2791
|
+
if (c = RegExp(`^${ga} (\\d{1,2})(?: (\\d{2}|\\d{4}))?$`).exec(o)) return s(c[2], c[1], c[3]);
|
|
2792
|
+
if (c = RegExp(`^(\\d{4}) ${ga} (\\d{1,2})$`).exec(o)) return s(c[3], c[2], c[1]);
|
|
2793
|
+
if (c = RegExp(`^${ga}(?: (\\d{4}))?$`).exec(o)) {
|
|
2794
|
+
let e = ha[c[1]];
|
|
2738
2795
|
if (c[2]) {
|
|
2739
2796
|
let t = $(Number(c[2]), e, 1);
|
|
2740
2797
|
return t && {
|
|
@@ -2755,22 +2812,22 @@ function Ca(e, t, n) {
|
|
|
2755
2812
|
} : void 0;
|
|
2756
2813
|
}
|
|
2757
2814
|
}
|
|
2758
|
-
function
|
|
2815
|
+
function ja(e) {
|
|
2759
2816
|
return `${e}${e % 100 >= 11 && e % 100 <= 13 ? "th" : {
|
|
2760
2817
|
1: "st",
|
|
2761
2818
|
2: "nd",
|
|
2762
2819
|
3: "rd"
|
|
2763
2820
|
}[e % 10] ?? "th"}`;
|
|
2764
2821
|
}
|
|
2765
|
-
function
|
|
2766
|
-
return e.toLowerCase().replace(/['’]/g, "").replace(/,/g, " ").replace(/\.+$/, "").replace(RegExp(`\\b(twenty|thirty)[ -](${
|
|
2822
|
+
function Ma(e) {
|
|
2823
|
+
return e.toLowerCase().replace(/['’]/g, "").replace(/,/g, " ").replace(/\.+$/, "").replace(RegExp(`\\b(twenty|thirty)[ -](${xa})\\b`, "g"), (e, t, n) => ja((t === "twenty" ? 20 : 30) + ba[n])).replace(RegExp(`\\b(${xa})\\b`, "g"), (e) => ja(ba[e])).replace(/\b(?:a )?couple(?: of)?\b/g, "2").replace(/\b(?:a )?few\b/g, "3").replace(/\b(?:at |@ ?)?\d{1,2}(?::\d{2})? ?(?:am|pm)\b/g, " ").replace(/\b(?:at |@ ?)\d{1,2}(?::\d{2})?\b(?![/.\-]\d)/g, " ").replace(/\b\d{1,2}:\d{2}\b/g, " ").replace(/\b(?:at )?(?:noon|midday|midnight)\b/g, " ").replace(/\b(?:tonight|this (?:morning|afternoon|evening)|eod|end of (?:the )?day)\b/g, " today ").replace(/\b(?:in the )?(?:morning|afternoon|evening|(?<!bonfire |fawkes )night)\b/g, " ").replace(/\bthe\b/g, " ").replace(/\s+/g, " ").trim();
|
|
2767
2824
|
}
|
|
2768
|
-
function
|
|
2825
|
+
function Na(e, t) {
|
|
2769
2826
|
let { today: n, order: r = [
|
|
2770
2827
|
"day",
|
|
2771
2828
|
"month",
|
|
2772
2829
|
"year"
|
|
2773
|
-
], prefer: i = "future" } = t, a =
|
|
2830
|
+
], prefer: i = "future" } = t, a = Ma(e);
|
|
2774
2831
|
if (!a) return;
|
|
2775
2832
|
let o = ` ${a} `, s = !1, c = !1, l = [], u = !1, d = {
|
|
2776
2833
|
days: 0,
|
|
@@ -2780,7 +2837,7 @@ function Ea(e, t) {
|
|
|
2780
2837
|
}, f = {
|
|
2781
2838
|
year: !1,
|
|
2782
2839
|
month: !1
|
|
2783
|
-
}, p =
|
|
2840
|
+
}, p = Ca(n);
|
|
2784
2841
|
function m(e) {
|
|
2785
2842
|
let t = RegExp(` ${e} `).exec(o);
|
|
2786
2843
|
return t && (o = o.replace(t[0], " "), s = !0), t;
|
|
@@ -2790,18 +2847,18 @@ function Ea(e, t) {
|
|
|
2790
2847
|
}, g = (e) => e && {
|
|
2791
2848
|
kind: "date",
|
|
2792
2849
|
date: e
|
|
2793
|
-
}, _ = (e, t = 1) => e.slice(t).find((e) => e !== void 0), v = (e) => e === "fortnight" ? ["weeks", 2] : [`${e}s`, 1], y = (e) =>
|
|
2794
|
-
if (m("eow") && h(g(p.add({ days: 4 }))), m("eom") && h(g(_n(n))), m("eoy") && h(g(new gn(n.year, 12, 31))), x = m(`(1st|2nd|3rd|4th|5th|last) ${Q} (?:of|in) (?:(this|next|last) month|month|${
|
|
2795
|
-
let e = x[1] === "last" ? -1 : Number(x[1][0]), t =
|
|
2850
|
+
}, _ = (e, t = 1) => e.slice(t).find((e) => e !== void 0), v = (e) => e === "fortnight" ? ["weeks", 2] : [`${e}s`, 1], y = (e) => _a[e] ?? Number(e), b = (e) => n.add({ days: (e - Sa(n) + 7) % 7 || 7 }), x;
|
|
2851
|
+
if (m("eow") && h(g(p.add({ days: 4 }))), m("eom") && h(g(_n(n))), m("eoy") && h(g(new gn(n.year, 12, 31))), x = m(`(1st|2nd|3rd|4th|5th|last) ${Q} (?:of|in) (?:(this|next|last) month|month|${ga}(?: (\\d{4}))?)`)) {
|
|
2852
|
+
let e = x[1] === "last" ? -1 : Number(x[1][0]), t = ma[x[2]];
|
|
2796
2853
|
if (x[4]) {
|
|
2797
|
-
let n =
|
|
2798
|
-
x[5] ? h(g(
|
|
2854
|
+
let n = ha[x[4]];
|
|
2855
|
+
x[5] ? h(g(wa(Number(x[5]), n, t, e))) : h({
|
|
2799
2856
|
kind: "yearless",
|
|
2800
|
-
resolve: (r) =>
|
|
2857
|
+
resolve: (r) => wa(r, n, t, e)
|
|
2801
2858
|
});
|
|
2802
2859
|
} else {
|
|
2803
2860
|
let r = x[3] === "next" ? 1 : x[3] === "last" ? -1 : 0, i = xn(n).add({ months: r });
|
|
2804
|
-
h(g(
|
|
2861
|
+
h(g(wa(i.year, i.month, t, e)));
|
|
2805
2862
|
}
|
|
2806
2863
|
}
|
|
2807
2864
|
if (x = m("(start|beginning|middle|mid|end) (?:of )?(?:(this|next|last) )?(week|month|year)")) {
|
|
@@ -2815,8 +2872,8 @@ function Ea(e, t) {
|
|
|
2815
2872
|
h(g(t === "start" ? new gn(r, 1, 1) : t === "mid" ? new gn(r, 7, 1) : new gn(r, 12, 31)));
|
|
2816
2873
|
}
|
|
2817
2874
|
}
|
|
2818
|
-
if (x = m(`(start|beginning|early|middle|mid|late|end) (?:of )?${
|
|
2819
|
-
let e = x[1], t =
|
|
2875
|
+
if (x = m(`(start|beginning|early|middle|mid|late|end) (?:of )?${ga}(?: (\\d{4}))?`)) {
|
|
2876
|
+
let e = x[1], t = ha[x[2]], n = (n) => [
|
|
2820
2877
|
"start",
|
|
2821
2878
|
"beginning",
|
|
2822
2879
|
"early"
|
|
@@ -2833,38 +2890,38 @@ function Ea(e, t) {
|
|
|
2833
2890
|
kind: "weekday",
|
|
2834
2891
|
weekday: 6
|
|
2835
2892
|
});
|
|
2836
|
-
for (let [e, t] of
|
|
2893
|
+
for (let [e, t] of Da) m(e) && h({
|
|
2837
2894
|
kind: "yearless",
|
|
2838
2895
|
resolve: t
|
|
2839
2896
|
});
|
|
2840
|
-
if ((x = m(`${Q} after next`)) && h(g(b(
|
|
2897
|
+
if ((x = m(`${Q} after next`)) && h(g(b(ma[x[1]]).add({ weeks: 1 }))), (x = m(`${Q} (week|fortnight)`)) && h(g(b(ma[x[1]]).add({ weeks: x[2] === "fortnight" ? 2 : 1 }))), x = m(`${va} ${ya} on ${Q}`)) {
|
|
2841
2898
|
let [e, t] = v(x[2]);
|
|
2842
|
-
h(g(b(
|
|
2899
|
+
h(g(b(ma[x[3]]).add({ [e]: y(x[1]) * t })));
|
|
2843
2900
|
}
|
|
2844
|
-
if (x = m(`${
|
|
2901
|
+
if (x = m(`${va} ${ya} (today|tomorrow|tmrw|tmr)`)) {
|
|
2845
2902
|
let [e, t] = v(x[2]);
|
|
2846
2903
|
h(g((x[3] === "today" ? n : n.add({ days: 1 })).add({ [e]: y(x[1]) * t })));
|
|
2847
2904
|
}
|
|
2848
2905
|
for ((x = m(`(?:next week ${Q}|${Q} next week|next ${Q})`)) && h(g(p.add({
|
|
2849
2906
|
weeks: 1,
|
|
2850
|
-
days:
|
|
2851
|
-
}))), (x = m(`(?:last week ${Q}|${Q} last week)`)) && h(g(p.subtract({ weeks: 1 }).add({ days:
|
|
2907
|
+
days: ma[_(x)] - 1
|
|
2908
|
+
}))), (x = m(`(?:last week ${Q}|${Q} last week)`)) && h(g(p.subtract({ weeks: 1 }).add({ days: ma[_(x)] - 1 }))), (x = m(`(?:this week ${Q}|${Q} this week|this ${Q})`)) && h(g(p.add({ days: ma[_(x)] - 1 }))), (x = m(`last ${Q}`)) && h(g(n.subtract({ days: (Sa(n) - ma[x[1]] + 7) % 7 || 7 }))), m("day after (?:tomorrow|tmrw|tmr)") && h(g(n.add({ days: 2 }))), m("day before yesterday") && h(g(n.subtract({ days: 2 }))), m("(?:tomorrow|tmrw|tmr|tmw|tomoz)") && h(g(n.add({ days: 1 }))), m("(?:yesterday|yday|yest)") && h(g(n.subtract({ days: 1 }))), m("(?:today|now|tdy)") && h(g(n)), (x = m(`(?:on )?${Q}`)) && h({
|
|
2852
2909
|
kind: "weekday",
|
|
2853
|
-
weekday:
|
|
2854
|
-
}, !0), m("this year") && (f.year = !0), m("this month") && (f.month = !0); x = m(`(next|last) ${
|
|
2910
|
+
weekday: ma[x[1]]
|
|
2911
|
+
}, !0), m("this year") && (f.year = !0), m("this month") && (f.month = !0); x = m(`(next|last) ${ya}`);) {
|
|
2855
2912
|
let [e, t] = v(x[2]);
|
|
2856
2913
|
d[e] += (x[1] === "next" ? 1 : -1) * t;
|
|
2857
2914
|
}
|
|
2858
2915
|
let S = !1;
|
|
2859
|
-
for (; x = m(`in ${
|
|
2916
|
+
for (; x = m(`in ${va} ${ya}`);) {
|
|
2860
2917
|
let [e, t] = v(x[2]);
|
|
2861
2918
|
d[e] += y(x[1]) * t, S = !0;
|
|
2862
2919
|
}
|
|
2863
|
-
for (; S && (x = m(`(?:and )?${
|
|
2920
|
+
for (; S && (x = m(`(?:and )?${va} ${ya}(?! (?:ago|before|earlier|from|after|later))`));) {
|
|
2864
2921
|
let [e, t] = v(x[2]);
|
|
2865
2922
|
d[e] += y(x[1]) * t;
|
|
2866
2923
|
}
|
|
2867
|
-
for (; x = m(`${
|
|
2924
|
+
for (; x = m(`${va} ${ya} (ago|before|earlier|from|after|later)`);) {
|
|
2868
2925
|
let [e, t] = v(x[2]), n = [
|
|
2869
2926
|
"ago",
|
|
2870
2927
|
"before",
|
|
@@ -2875,24 +2932,24 @@ function Ea(e, t) {
|
|
|
2875
2932
|
for (; m("(?:on|of|at|by|for)"););
|
|
2876
2933
|
let C = o.trim();
|
|
2877
2934
|
if (s && /^\d{4}$/.test(C) && (f.yearValue = Number(C), C = ""), C) {
|
|
2878
|
-
let e =
|
|
2935
|
+
let e = Aa(C, n, r);
|
|
2879
2936
|
if (!e) return;
|
|
2880
2937
|
l.length === 1 && u && l.pop(), l.push(e);
|
|
2881
2938
|
} else if (!s) return;
|
|
2882
|
-
if (!(c || l.length > 1)) return
|
|
2939
|
+
if (!(c || l.length > 1)) return ka(l[0], d, f, n, i);
|
|
2883
2940
|
}
|
|
2884
2941
|
// src/components/InputDate/InputDate.vue?vue&type=script&setup=true&lang.ts
|
|
2885
|
-
var
|
|
2942
|
+
var Pa = [
|
|
2886
2943
|
"id",
|
|
2887
2944
|
"placeholder",
|
|
2888
2945
|
"disabled",
|
|
2889
2946
|
"aria-invalid",
|
|
2890
2947
|
"aria-describedby"
|
|
2891
|
-
],
|
|
2948
|
+
], Fa = {
|
|
2892
2949
|
key: 0,
|
|
2893
2950
|
"aria-hidden": "true",
|
|
2894
2951
|
class: "shrink-0 tabular-nums text-black/55"
|
|
2895
|
-
},
|
|
2952
|
+
}, Ia = /* @__PURE__ */ f({
|
|
2896
2953
|
inheritAttrs: !1,
|
|
2897
2954
|
__name: "InputDate",
|
|
2898
2955
|
props: /*@__PURE__*/ g({
|
|
@@ -2951,7 +3008,7 @@ var Da = [
|
|
|
2951
3008
|
return g.value.format(new Date(e.year, e.month - 1, e.day));
|
|
2952
3009
|
}
|
|
2953
3010
|
function D(e) {
|
|
2954
|
-
return
|
|
3011
|
+
return Na(e, {
|
|
2955
3012
|
today: Cn(vn()),
|
|
2956
3013
|
order: b.value,
|
|
2957
3014
|
prefer: n.prefer
|
|
@@ -2986,17 +3043,17 @@ var Da = [
|
|
|
2986
3043
|
t && O.value === T(t) || (e.preventDefault(), I());
|
|
2987
3044
|
}
|
|
2988
3045
|
let B = i(() => A.value ?? h.value), ee = i(() => n.status ?? (B.value ? "error" : void 0)), W = i(() => n.statusText ?? B.value), G = E(!1);
|
|
2989
|
-
function
|
|
3046
|
+
function q(e) {
|
|
2990
3047
|
r.value = e, G.value = !1;
|
|
2991
3048
|
}
|
|
2992
|
-
let
|
|
3049
|
+
let J = [
|
|
2993
3050
|
"flex w-9 shrink-0 -my-2 -mr-3 self-stretch items-center justify-center",
|
|
2994
3051
|
"rounded-r border-l border-black/15 bg-white cursor-pointer transition",
|
|
2995
3052
|
"not-disabled:hover:brightness-90 not-disabled:active:brightness-80 [&_svg]:opacity-100!",
|
|
2996
3053
|
"data-[state=open]:brightness-90 disabled:cursor-not-allowed",
|
|
2997
3054
|
"outline-2 -outline-offset-2 outline-transparent focus-visible:outline-focus"
|
|
2998
3055
|
];
|
|
2999
|
-
return (i, l) => (w(), a(
|
|
3056
|
+
return (i, l) => (w(), a($i, {
|
|
3000
3057
|
label: e.label,
|
|
3001
3058
|
helper: e.helper,
|
|
3002
3059
|
"helper-placement": e.helperPlacement,
|
|
@@ -3027,11 +3084,11 @@ var Da = [
|
|
|
3027
3084
|
onInput: P,
|
|
3028
3085
|
onBlur: I,
|
|
3029
3086
|
onKeydown: U(L, ["enter"])
|
|
3030
|
-
}), null, 16,
|
|
3031
|
-
k.value ? (w(), s("span",
|
|
3087
|
+
}), null, 16, Pa), [[R, O.value]]),
|
|
3088
|
+
k.value ? (w(), s("span", Fa, j(k.value), 1)) : o("", !0),
|
|
3032
3089
|
d(M(lt), {
|
|
3033
3090
|
"aria-label": M(t)("ui.inputDate.openCalendar"),
|
|
3034
|
-
class: y(
|
|
3091
|
+
class: y(J)
|
|
3035
3092
|
}, {
|
|
3036
3093
|
default: V(() => [d(M(ce))]),
|
|
3037
3094
|
_: 1
|
|
@@ -3041,12 +3098,12 @@ var Da = [
|
|
|
3041
3098
|
align: "end",
|
|
3042
3099
|
class: y([M(Kn), "p-3"])
|
|
3043
3100
|
}, {
|
|
3044
|
-
default: V(() => [d(
|
|
3101
|
+
default: V(() => [d(pa, {
|
|
3045
3102
|
"model-value": r.value,
|
|
3046
3103
|
min: e.min,
|
|
3047
3104
|
max: e.max,
|
|
3048
3105
|
locale: e.locale,
|
|
3049
|
-
"onUpdate:modelValue":
|
|
3106
|
+
"onUpdate:modelValue": q
|
|
3050
3107
|
}, null, 8, [
|
|
3051
3108
|
"model-value",
|
|
3052
3109
|
"min",
|
|
@@ -3071,7 +3128,7 @@ var Da = [
|
|
|
3071
3128
|
"class"
|
|
3072
3129
|
]));
|
|
3073
3130
|
}
|
|
3074
|
-
}),
|
|
3131
|
+
}), La = /* @__PURE__ */ f({
|
|
3075
3132
|
__name: "Tooltip",
|
|
3076
3133
|
props: {
|
|
3077
3134
|
text: {},
|
|
@@ -3122,7 +3179,7 @@ var Da = [
|
|
|
3122
3179
|
_: 3
|
|
3123
3180
|
}));
|
|
3124
3181
|
}
|
|
3125
|
-
}),
|
|
3182
|
+
}), Ra = { class: "-mx-3 -my-2 flex min-w-0 flex-1 flex-col self-stretch" }, za = ["aria-label", "aria-controls"], Ba = /* @__PURE__ */ f({
|
|
3126
3183
|
__name: "InputRichText",
|
|
3127
3184
|
props: /*@__PURE__*/ g({
|
|
3128
3185
|
label: {},
|
|
@@ -3229,7 +3286,7 @@ var Da = [
|
|
|
3229
3286
|
toggle: () => l.value?.chain().focus().toggleUnderline().run()
|
|
3230
3287
|
}
|
|
3231
3288
|
], v = "min-h-24 max-h-80 overflow-y-auto px-3 py-2 text-sm pointer-coarse:text-base outline-none cursor-text [&_p+p]:mt-2 [&_p.is-editor-empty:first-child]:before:pointer-events-none [&_p.is-editor-empty:first-child]:before:float-left [&_p.is-editor-empty:first-child]:before:h-0 [&_p.is-editor-empty:first-child]:before:text-black/55 [&_p.is-editor-empty:first-child]:before:content-[attr(data-placeholder)]";
|
|
3232
|
-
return (i, o) => (w(), a(
|
|
3289
|
+
return (i, o) => (w(), a($i, {
|
|
3233
3290
|
label: e.label,
|
|
3234
3291
|
helper: e.helper,
|
|
3235
3292
|
"helper-placement": e.helperPlacement,
|
|
@@ -3240,14 +3297,14 @@ var Da = [
|
|
|
3240
3297
|
disabled: e.disabled,
|
|
3241
3298
|
class: y(r.class)
|
|
3242
3299
|
}, {
|
|
3243
|
-
default: V((r) => [c("div",
|
|
3300
|
+
default: V((r) => [c("div", Ra, [
|
|
3244
3301
|
c("div", {
|
|
3245
3302
|
role: "toolbar",
|
|
3246
3303
|
"aria-label": M(t)("ui.inputRichText.formattingFor", { label: e.label }),
|
|
3247
3304
|
"aria-controls": r.id,
|
|
3248
3305
|
class: "flex items-center gap-0.5 border-b border-black/15 px-1.5 py-1 [&_svg]:opacity-100!",
|
|
3249
3306
|
onMousedown: o[0] ||= ee(() => {}, ["prevent"])
|
|
3250
|
-
}, [(w(), s(n, null, D(_, (t) => d(
|
|
3307
|
+
}, [(w(), s(n, null, D(_, (t) => d(La, {
|
|
3251
3308
|
key: t.name,
|
|
3252
3309
|
text: `${t.label} (${M(g)}${t.key})`,
|
|
3253
3310
|
disabled: e.disabled
|
|
@@ -3273,7 +3330,7 @@ var Da = [
|
|
|
3273
3330
|
"onClick"
|
|
3274
3331
|
])]),
|
|
3275
3332
|
_: 2
|
|
3276
|
-
}, 1032, ["text", "disabled"])), 64))], 40,
|
|
3333
|
+
}, 1032, ["text", "disabled"])), 64))], 40, za),
|
|
3277
3334
|
d(M(m), { ids: r }, null, 8, ["ids"]),
|
|
3278
3335
|
d(M(wn), {
|
|
3279
3336
|
editor: M(l),
|
|
@@ -3293,18 +3350,18 @@ var Da = [
|
|
|
3293
3350
|
"class"
|
|
3294
3351
|
]));
|
|
3295
3352
|
}
|
|
3296
|
-
}),
|
|
3353
|
+
}), Va = [
|
|
3297
3354
|
"id",
|
|
3298
3355
|
"type",
|
|
3299
3356
|
"autocomplete",
|
|
3300
3357
|
"disabled",
|
|
3301
3358
|
"aria-invalid",
|
|
3302
3359
|
"aria-describedby"
|
|
3303
|
-
],
|
|
3360
|
+
], Ha = [
|
|
3304
3361
|
"aria-controls",
|
|
3305
3362
|
"aria-pressed",
|
|
3306
3363
|
"disabled"
|
|
3307
|
-
],
|
|
3364
|
+
], Ua = { class: "sr-only" }, Wa = /* @__PURE__ */ f({
|
|
3308
3365
|
inheritAttrs: !1,
|
|
3309
3366
|
__name: "InputPassword",
|
|
3310
3367
|
props: /*@__PURE__*/ g({
|
|
@@ -3343,7 +3400,7 @@ var Da = [
|
|
|
3343
3400
|
"not-disabled:hover:brightness-90 not-disabled:active:brightness-80 [&_svg]:opacity-100!",
|
|
3344
3401
|
"outline-none focus-visible:bg-black/5 disabled:cursor-not-allowed"
|
|
3345
3402
|
];
|
|
3346
|
-
return (i, o) => (w(), a(
|
|
3403
|
+
return (i, o) => (w(), a($i, {
|
|
3347
3404
|
label: e.label,
|
|
3348
3405
|
helper: e.helper,
|
|
3349
3406
|
"helper-placement": e.helperPlacement,
|
|
@@ -3372,7 +3429,7 @@ var Da = [
|
|
|
3372
3429
|
onKeydown: h,
|
|
3373
3430
|
onKeyup: h,
|
|
3374
3431
|
onBlur: o[1] ||= (e) => m.value = !1
|
|
3375
|
-
}), null, 16,
|
|
3432
|
+
}), null, 16, Va), [[L, r.value]]), c("button", {
|
|
3376
3433
|
type: "button",
|
|
3377
3434
|
class: y(v),
|
|
3378
3435
|
"aria-controls": n,
|
|
@@ -3380,13 +3437,13 @@ var Da = [
|
|
|
3380
3437
|
disabled: e.disabled,
|
|
3381
3438
|
onPointerdown: o[2] ||= ee(() => {}, ["prevent"]),
|
|
3382
3439
|
onClick: o[3] ||= (e) => d.value = !d.value
|
|
3383
|
-
}, [c("span",
|
|
3440
|
+
}, [c("span", Ua, j(M(t)("ui.inputPassword.show")), 1), d.value ? (w(), a(M(Y), {
|
|
3384
3441
|
key: 0,
|
|
3385
3442
|
"aria-hidden": "true"
|
|
3386
3443
|
})) : (w(), a(M(xe), {
|
|
3387
3444
|
key: 1,
|
|
3388
3445
|
"aria-hidden": "true"
|
|
3389
|
-
}))], 40,
|
|
3446
|
+
}))], 40, Ha)]),
|
|
3390
3447
|
_: 2
|
|
3391
3448
|
}, [i.$slots.leading ? {
|
|
3392
3449
|
name: "leading",
|
|
@@ -3408,7 +3465,7 @@ var Da = [
|
|
|
3408
3465
|
"class"
|
|
3409
3466
|
]));
|
|
3410
3467
|
}
|
|
3411
|
-
}),
|
|
3468
|
+
}), Ga = { class: "flex flex-col gap-0.5" }, Ka = { class: "flex items-center gap-1" }, qa = ["for"], Ja = ["hidden"], Ya = /* @__PURE__ */ f({
|
|
3412
3469
|
__name: "InputCode",
|
|
3413
3470
|
props: /*@__PURE__*/ g({
|
|
3414
3471
|
label: {},
|
|
@@ -3451,11 +3508,11 @@ var Da = [
|
|
|
3451
3508
|
loading: ""
|
|
3452
3509
|
};
|
|
3453
3510
|
return (t, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", l.class)) }, [
|
|
3454
|
-
c("div",
|
|
3511
|
+
c("div", Ga, [c("div", Ka, [c("label", {
|
|
3455
3512
|
id: m,
|
|
3456
3513
|
for: `${M(p)}-0`,
|
|
3457
3514
|
class: "text-sm"
|
|
3458
|
-
}, j(e.label), 9,
|
|
3515
|
+
}, j(e.label), 9, qa), e.helper && e.helperPlacement === "icon" ? (w(), a(Gi, {
|
|
3459
3516
|
key: 0,
|
|
3460
3517
|
text: e.helper,
|
|
3461
3518
|
label: M(r)("ui.formField.about", { label: e.label })
|
|
@@ -3464,7 +3521,7 @@ var Da = [
|
|
|
3464
3521
|
id: h,
|
|
3465
3522
|
hidden: e.helperPlacement === "icon",
|
|
3466
3523
|
class: "text-xs text-black/65"
|
|
3467
|
-
}, j(e.helper), 9,
|
|
3524
|
+
}, j(e.helper), 9, Ja)) : o("", !0)]),
|
|
3468
3525
|
d(M(Ot), {
|
|
3469
3526
|
"model-value": x.value,
|
|
3470
3527
|
type: e.alphanumeric ? "text" : "number",
|
|
@@ -3507,32 +3564,32 @@ var Da = [
|
|
|
3507
3564
|
"disabled",
|
|
3508
3565
|
"class"
|
|
3509
3566
|
]),
|
|
3510
|
-
d(
|
|
3567
|
+
d(Ji, {
|
|
3511
3568
|
id: g,
|
|
3512
3569
|
status: _.value,
|
|
3513
3570
|
text: v.value
|
|
3514
3571
|
}, null, 8, ["status", "text"])
|
|
3515
3572
|
], 2));
|
|
3516
3573
|
}
|
|
3517
|
-
}),
|
|
3574
|
+
}), Xa = {
|
|
3518
3575
|
key: 0,
|
|
3519
3576
|
class: "flex min-w-0 flex-1 flex-wrap gap-1"
|
|
3520
|
-
},
|
|
3577
|
+
}, Za = {
|
|
3521
3578
|
key: 1,
|
|
3522
3579
|
class: "h-5 min-w-0 flex-1 truncate"
|
|
3523
|
-
},
|
|
3580
|
+
}, Qa = { class: "flex h-5 shrink-0 items-center" }, $a = { class: "min-w-0 flex-1 truncate" }, eo = { class: "truncate" }, to = {
|
|
3524
3581
|
key: 0,
|
|
3525
3582
|
class: "flex h-5 shrink-0 items-center"
|
|
3526
|
-
},
|
|
3583
|
+
}, no = { class: "flex min-w-0 flex-1 flex-col" }, ro = {
|
|
3527
3584
|
key: 0,
|
|
3528
3585
|
class: "sr-only"
|
|
3529
|
-
},
|
|
3586
|
+
}, io = {
|
|
3530
3587
|
key: 0,
|
|
3531
3588
|
class: "text-xs text-black/65"
|
|
3532
|
-
},
|
|
3589
|
+
}, ao = {
|
|
3533
3590
|
key: 1,
|
|
3534
3591
|
class: "text-xs text-black/65"
|
|
3535
|
-
},
|
|
3592
|
+
}, oo = { class: "flex h-5 w-4 shrink-0 items-center justify-center" }, so = "-mx-3 -my-2 flex min-w-0 flex-1 items-center gap-2 self-stretch px-3 py-2", co = "transition-transform duration-150 in-data-[state=open]:rotate-180 motion-reduce:transition-none", lo = /* @__PURE__ */ f({
|
|
3536
3593
|
__name: "Select",
|
|
3537
3594
|
props: /*@__PURE__*/ g({
|
|
3538
3595
|
label: {},
|
|
@@ -3593,15 +3650,15 @@ var Da = [
|
|
|
3593
3650
|
function B(e) {
|
|
3594
3651
|
r.multiple && !oe.value && p.value.length && (e.preventDefault(), z(p.value[p.value.length - 1]));
|
|
3595
3652
|
}
|
|
3596
|
-
let H = (e) => A.value.find((t) => t.option.value === e)?.option.label ?? "", W = E([]), G = i(() => W.value[W.value.length - 1]),
|
|
3597
|
-
function
|
|
3598
|
-
|
|
3653
|
+
let H = (e) => A.value.find((t) => t.option.value === e)?.option.label ?? "", W = E([]), G = i(() => W.value[W.value.length - 1]), q = E(!1);
|
|
3654
|
+
function J(e) {
|
|
3655
|
+
q.value = e, e ? W.value = I.value ? [...I.value.path] : [] : re.value = ne;
|
|
3599
3656
|
}
|
|
3600
|
-
function
|
|
3601
|
-
e.target.select(),
|
|
3657
|
+
function te(e) {
|
|
3658
|
+
e.target.select(), re.value = ne;
|
|
3602
3659
|
}
|
|
3603
|
-
let
|
|
3604
|
-
|
|
3660
|
+
let ne = !1, re = E(!1), ie = () => ne = !0, ae = () => {
|
|
3661
|
+
ne = !1, re.value = !1;
|
|
3605
3662
|
};
|
|
3606
3663
|
C(() => {
|
|
3607
3664
|
document.addEventListener("pointerdown", ie, !0), document.addEventListener("keydown", ae, !0), document.fonts?.load(`700 1em ${getComputedStyle(document.body).fontFamily}`).catch(() => {});
|
|
@@ -3689,7 +3746,7 @@ var Da = [
|
|
|
3689
3746
|
e.option.description,
|
|
3690
3747
|
e.path
|
|
3691
3748
|
].filter(Boolean).join(" ") : e.option.label;
|
|
3692
|
-
return (i, f) => (w(), a(
|
|
3749
|
+
return (i, f) => (w(), a($i, {
|
|
3693
3750
|
label: e.label,
|
|
3694
3751
|
helper: e.helper,
|
|
3695
3752
|
"helper-placement": e.helperPlacement,
|
|
@@ -3711,21 +3768,21 @@ var Da = [
|
|
|
3711
3768
|
class: "contents"
|
|
3712
3769
|
} : {}, {
|
|
3713
3770
|
"onUpdate:modelValue": h,
|
|
3714
|
-
open:
|
|
3715
|
-
"onUpdate:open":
|
|
3771
|
+
open: q.value,
|
|
3772
|
+
"onUpdate:open": J
|
|
3716
3773
|
}), {
|
|
3717
3774
|
default: V(() => [e.searchable ? (w(), a(M(Je), {
|
|
3718
3775
|
key: 0,
|
|
3719
|
-
class: y(
|
|
3720
|
-
onPointerdown: f[4] ||= (e) =>
|
|
3721
|
-
onClick: f[5] ||= (t) => !e.disabled && !t.target.closest("button") &&
|
|
3776
|
+
class: y(so),
|
|
3777
|
+
onPointerdown: f[4] ||= (e) => re.value = !0,
|
|
3778
|
+
onClick: f[5] ||= (t) => !e.disabled && !t.target.closest("button") && J(!0)
|
|
3722
3779
|
}, {
|
|
3723
3780
|
default: V(() => [
|
|
3724
3781
|
O(i.$slots, "leading", {}, () => [L.value?.icon ? (w(), a(k(L.value.icon), {
|
|
3725
3782
|
key: 0,
|
|
3726
3783
|
"aria-hidden": "true"
|
|
3727
3784
|
})) : o("", !0)]),
|
|
3728
|
-
c("span", { class: y(e.multiple ? "flex min-w-0 flex-1 flex-wrap items-center gap-1" : "contents") }, [(w(!0), s(n, null, D(R.value, (n) => (w(), a(
|
|
3785
|
+
c("span", { class: y(e.multiple ? "flex min-w-0 flex-1 flex-wrap items-center gap-1" : "contents") }, [(w(!0), s(n, null, D(R.value, (n) => (w(), a(Ni, {
|
|
3729
3786
|
key: String(n.value),
|
|
3730
3787
|
size: "sm",
|
|
3731
3788
|
removable: "",
|
|
@@ -3757,9 +3814,9 @@ var Da = [
|
|
|
3757
3814
|
"aria-describedby": p,
|
|
3758
3815
|
autocomplete: "off",
|
|
3759
3816
|
class: y(M(X)("h-5 min-w-0 flex-1 bg-transparent outline-none placeholder:text-black/55 disabled:cursor-not-allowed", e.multiple && "min-w-16")),
|
|
3760
|
-
"data-pointer-focus":
|
|
3761
|
-
onFocus:
|
|
3762
|
-
onBlur: f[2] ||= (e) =>
|
|
3817
|
+
"data-pointer-focus": re.value || void 0,
|
|
3818
|
+
onFocus: te,
|
|
3819
|
+
onBlur: f[2] ||= (e) => re.value = !1,
|
|
3763
3820
|
onKeydown: [f[3] ||= (e) => e.target.ariaExpanded === "true" && xe(e), U(B, ["backspace"])]
|
|
3764
3821
|
}, null, 8, [
|
|
3765
3822
|
"id",
|
|
@@ -3778,7 +3835,7 @@ var Da = [
|
|
|
3778
3835
|
}, {
|
|
3779
3836
|
default: V(() => [d(M(ue), {
|
|
3780
3837
|
"aria-hidden": "true",
|
|
3781
|
-
class: y(
|
|
3838
|
+
class: y(co)
|
|
3782
3839
|
})]),
|
|
3783
3840
|
_: 1
|
|
3784
3841
|
}, 8, ["aria-label"])
|
|
@@ -3789,16 +3846,16 @@ var Da = [
|
|
|
3789
3846
|
id: r,
|
|
3790
3847
|
"aria-invalid": v,
|
|
3791
3848
|
"aria-describedby": p,
|
|
3792
|
-
"data-pointer-focus":
|
|
3793
|
-
onBlur: f[6] ||= (e) =>
|
|
3794
|
-
class: y(M(X)(
|
|
3849
|
+
"data-pointer-focus": re.value || void 0,
|
|
3850
|
+
onBlur: f[6] ||= (e) => re.value = !1,
|
|
3851
|
+
class: y(M(X)(so, "cursor-pointer text-left outline-none disabled:cursor-not-allowed data-placeholder:text-black/55"))
|
|
3795
3852
|
}, {
|
|
3796
3853
|
default: V(() => [
|
|
3797
3854
|
O(i.$slots, "leading", {}, () => [L.value?.icon ? (w(), a(k(L.value.icon), {
|
|
3798
3855
|
key: 0,
|
|
3799
3856
|
"aria-hidden": "true"
|
|
3800
3857
|
})) : o("", !0)]),
|
|
3801
|
-
e.multiple && R.value.length ? (w(), s("span",
|
|
3858
|
+
e.multiple && R.value.length ? (w(), s("span", Xa, [(w(!0), s(n, null, D(R.value, (e) => (w(), a(Ni, {
|
|
3802
3859
|
key: String(e.value),
|
|
3803
3860
|
size: "sm"
|
|
3804
3861
|
}, l({
|
|
@@ -3808,10 +3865,10 @@ var Da = [
|
|
|
3808
3865
|
name: "leading",
|
|
3809
3866
|
fn: V(() => [(w(), a(k(e.icon), { "aria-hidden": "true" }))]),
|
|
3810
3867
|
key: "0"
|
|
3811
|
-
} : void 0]), 1024))), 128))])) : (w(), s("span",
|
|
3868
|
+
} : void 0]), 1024))), 128))])) : (w(), s("span", Za, j(L.value?.label ?? g.value), 1)),
|
|
3812
3869
|
d(M(ue), {
|
|
3813
3870
|
"aria-hidden": "true",
|
|
3814
|
-
class: y(
|
|
3871
|
+
class: y(co)
|
|
3815
3872
|
})
|
|
3816
3873
|
]),
|
|
3817
3874
|
_: 3
|
|
@@ -3846,10 +3903,10 @@ var Da = [
|
|
|
3846
3903
|
class: y(M(X)(Ce, "font-bold")),
|
|
3847
3904
|
onSelect: be
|
|
3848
3905
|
}, {
|
|
3849
|
-
default: V(() => [c("span",
|
|
3906
|
+
default: V(() => [c("span", Qa, [d(M(de), {
|
|
3850
3907
|
"aria-hidden": "true",
|
|
3851
3908
|
class: "size-4"
|
|
3852
|
-
})]), c("span",
|
|
3909
|
+
})]), c("span", $a, [f[9] ||= c("span", { class: "sr-only" }, "Back from ", -1), u(j(G.value.label), 1)])]),
|
|
3853
3910
|
_: 1
|
|
3854
3911
|
}, 40, ["text-value", "class"])), (w(), a(k(Y.value.Separator), { class: "-mx-1 my-0.5 border-t border-black/15" }))], 64)) : o("", !0),
|
|
3855
3912
|
(w(!0), s(n, null, D(pe.value, (e, t) => (w(), s(n, { key: t }, [t > 0 && !oe.value ? (w(), a(k(Y.value.Separator), {
|
|
@@ -3864,7 +3921,7 @@ var Da = [
|
|
|
3864
3921
|
key: 0,
|
|
3865
3922
|
"aria-hidden": "true",
|
|
3866
3923
|
class: "size-3.5 shrink-0"
|
|
3867
|
-
})) : o("", !0), c("span",
|
|
3924
|
+
})) : o("", !0), c("span", eo, j(e.label), 1)]),
|
|
3868
3925
|
_: 2
|
|
3869
3926
|
}, 1024)) : o("", !0), (w(!0), s(n, null, D(e.rows, (e) => (w(), a(k(Y.value.Item), {
|
|
3870
3927
|
key: e.key,
|
|
@@ -3876,19 +3933,19 @@ var Da = [
|
|
|
3876
3933
|
onSelect: (t) => e.parent && ye(t, e.option)
|
|
3877
3934
|
}, {
|
|
3878
3935
|
default: V(() => [
|
|
3879
|
-
e.option.icon ? (w(), s("span",
|
|
3936
|
+
e.option.icon ? (w(), s("span", to, [(w(), a(k(e.option.icon), {
|
|
3880
3937
|
"aria-hidden": "true",
|
|
3881
3938
|
class: "size-4 opacity-70"
|
|
3882
3939
|
}))])) : o("", !0),
|
|
3883
|
-
c("span",
|
|
3940
|
+
c("span", no, [
|
|
3884
3941
|
(w(), a(k(Y.value.ItemText), { class: "truncate in-data-[state=checked]:font-bold" }, {
|
|
3885
|
-
default: V(() => [u(j(e.option.label), 1), e.parent ? (w(), s("span",
|
|
3942
|
+
default: V(() => [u(j(e.option.label), 1), e.parent ? (w(), s("span", ro, ", more options")) : o("", !0)]),
|
|
3886
3943
|
_: 2
|
|
3887
3944
|
}, 1024)),
|
|
3888
|
-
e.path ? (w(), s("span",
|
|
3889
|
-
e.option.description ? (w(), s("span",
|
|
3945
|
+
e.path ? (w(), s("span", io, j(e.path), 1)) : o("", !0),
|
|
3946
|
+
e.option.description ? (w(), s("span", ao, j(e.option.description), 1)) : o("", !0)
|
|
3890
3947
|
]),
|
|
3891
|
-
c("span",
|
|
3948
|
+
c("span", oo, [e.parent ? (w(), a(M(fe), {
|
|
3892
3949
|
key: 0,
|
|
3893
3950
|
"aria-hidden": "true",
|
|
3894
3951
|
class: "size-4 opacity-70"
|
|
@@ -3936,7 +3993,7 @@ var Da = [
|
|
|
3936
3993
|
"class"
|
|
3937
3994
|
]));
|
|
3938
3995
|
}
|
|
3939
|
-
}),
|
|
3996
|
+
}), uo = { class: "flex items-start gap-2" }, fo = /* @__PURE__ */ f({
|
|
3940
3997
|
__name: "Checkbox",
|
|
3941
3998
|
props: /*@__PURE__*/ g({
|
|
3942
3999
|
label: {},
|
|
@@ -3975,7 +4032,7 @@ var Da = [
|
|
|
3975
4032
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus",
|
|
3976
4033
|
"[&_svg]:size-3.5 [&_svg]:stroke-3"
|
|
3977
4034
|
];
|
|
3978
|
-
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", e.disabled && "opacity-40", t.class)) }, [c("div",
|
|
4035
|
+
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", e.disabled && "opacity-40", t.class)) }, [c("div", uo, [d(M(qe), {
|
|
3979
4036
|
id: l,
|
|
3980
4037
|
modelValue: n.value,
|
|
3981
4038
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e,
|
|
@@ -4017,13 +4074,13 @@ var Da = [
|
|
|
4017
4074
|
key: 0,
|
|
4018
4075
|
id: u,
|
|
4019
4076
|
class: "text-xs text-black/65"
|
|
4020
|
-
}, j(e.description), 1)) : o("", !0)], 2)]), d(
|
|
4077
|
+
}, j(e.description), 1)) : o("", !0)], 2)]), d(Ji, {
|
|
4021
4078
|
id: f,
|
|
4022
4079
|
status: e.errorText ? "error" : void 0,
|
|
4023
4080
|
text: e.errorText
|
|
4024
4081
|
}, null, 8, ["status", "text"])], 2));
|
|
4025
4082
|
}
|
|
4026
|
-
}),
|
|
4083
|
+
}), po = { class: "flex flex-col gap-0.5" }, mo = { class: "flex items-center gap-1" }, ho = ["hidden"], go = ["onClick"], _o = ["for"], vo = ["id"], yo = /* @__PURE__ */ f({
|
|
4027
4084
|
__name: "RadioGroup",
|
|
4028
4085
|
props: /*@__PURE__*/ g({
|
|
4029
4086
|
label: {},
|
|
@@ -4058,10 +4115,10 @@ var Da = [
|
|
|
4058
4115
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus"
|
|
4059
4116
|
];
|
|
4060
4117
|
return (i, v) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", e.disabled && "opacity-40", r.class)) }, [
|
|
4061
|
-
c("div",
|
|
4118
|
+
c("div", po, [c("div", mo, [c("span", {
|
|
4062
4119
|
id: f,
|
|
4063
4120
|
class: "text-sm"
|
|
4064
|
-
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(
|
|
4121
|
+
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(Gi, {
|
|
4065
4122
|
key: 0,
|
|
4066
4123
|
text: e.helper,
|
|
4067
4124
|
label: M(t)("ui.formField.about", { label: e.label })
|
|
@@ -4070,7 +4127,7 @@ var Da = [
|
|
|
4070
4127
|
id: p,
|
|
4071
4128
|
hidden: e.helperPlacement === "icon",
|
|
4072
4129
|
class: "text-xs text-black/65"
|
|
4073
|
-
}, j(e.helper), 9,
|
|
4130
|
+
}, j(e.helper), 9, ho)) : o("", !0)]),
|
|
4074
4131
|
d(M(Bt), {
|
|
4075
4132
|
modelValue: l.value,
|
|
4076
4133
|
"onUpdate:modelValue": v[0] ||= (e) => l.value = e,
|
|
@@ -4106,11 +4163,11 @@ var Da = [
|
|
|
4106
4163
|
}, [c("label", {
|
|
4107
4164
|
for: `${M(u)}-${n}`,
|
|
4108
4165
|
class: y(M(X)("text-sm", e.disabled || t.disabled ? "cursor-not-allowed" : "cursor-pointer"))
|
|
4109
|
-
}, j(t.label), 11,
|
|
4166
|
+
}, j(t.label), 11, _o), t.description ? (w(), s("p", {
|
|
4110
4167
|
key: 0,
|
|
4111
4168
|
id: `${M(u)}-${n}-description`,
|
|
4112
4169
|
class: "text-xs text-black/65"
|
|
4113
|
-
}, j(t.description), 9,
|
|
4170
|
+
}, j(t.description), 9, vo)) : o("", !0)], 10, go)]))), 128))]),
|
|
4114
4171
|
_: 1
|
|
4115
4172
|
}, 8, [
|
|
4116
4173
|
"modelValue",
|
|
@@ -4120,14 +4177,14 @@ var Da = [
|
|
|
4120
4177
|
"aria-describedby",
|
|
4121
4178
|
"aria-invalid"
|
|
4122
4179
|
]),
|
|
4123
|
-
d(
|
|
4180
|
+
d(Ji, {
|
|
4124
4181
|
id: m,
|
|
4125
4182
|
status: e.errorText ? "error" : void 0,
|
|
4126
4183
|
text: e.errorText
|
|
4127
4184
|
}, null, 8, ["status", "text"])
|
|
4128
4185
|
], 2));
|
|
4129
4186
|
}
|
|
4130
|
-
}),
|
|
4187
|
+
}), bo = { class: "flex items-start gap-2" }, xo = "size-4 rounded-full bg-white shadow-sm transition-transform data-[state=checked]:translate-x-4 motion-reduce:transition-none", So = /* @__PURE__ */ f({
|
|
4131
4188
|
__name: "Switch",
|
|
4132
4189
|
props: /*@__PURE__*/ g({
|
|
4133
4190
|
label: {},
|
|
@@ -4164,7 +4221,7 @@ var Da = [
|
|
|
4164
4221
|
"disabled:cursor-not-allowed",
|
|
4165
4222
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus"
|
|
4166
4223
|
];
|
|
4167
|
-
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", e.disabled && "opacity-40", t.class)) }, [c("div",
|
|
4224
|
+
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", e.disabled && "opacity-40", t.class)) }, [c("div", bo, [d(M($t), {
|
|
4168
4225
|
id: a,
|
|
4169
4226
|
modelValue: n.value,
|
|
4170
4227
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e,
|
|
@@ -4174,7 +4231,7 @@ var Da = [
|
|
|
4174
4231
|
"aria-describedby": m.value,
|
|
4175
4232
|
class: y(g)
|
|
4176
4233
|
}, {
|
|
4177
|
-
default: V(() => [d(M(en), { class: y(
|
|
4234
|
+
default: V(() => [d(M(en), { class: y(xo) })]),
|
|
4178
4235
|
_: 1
|
|
4179
4236
|
}, 8, [
|
|
4180
4237
|
"modelValue",
|
|
@@ -4192,19 +4249,19 @@ var Da = [
|
|
|
4192
4249
|
key: 0,
|
|
4193
4250
|
id: l,
|
|
4194
4251
|
class: "text-xs text-black/65"
|
|
4195
|
-
}, j(e.description), 1)) : o("", !0)], 2)]), d(
|
|
4252
|
+
}, j(e.description), 1)) : o("", !0)], 2)]), d(Ji, {
|
|
4196
4253
|
id: u,
|
|
4197
4254
|
status: f.value,
|
|
4198
4255
|
text: p.value
|
|
4199
4256
|
}, null, 8, ["status", "text"])], 2));
|
|
4200
4257
|
}
|
|
4201
|
-
}),
|
|
4258
|
+
}), Co = [
|
|
4202
4259
|
"id",
|
|
4203
4260
|
"placeholder",
|
|
4204
4261
|
"disabled",
|
|
4205
4262
|
"aria-invalid",
|
|
4206
4263
|
"aria-describedby"
|
|
4207
|
-
],
|
|
4264
|
+
], wo = /* @__PURE__ */ f({
|
|
4208
4265
|
inheritAttrs: !1,
|
|
4209
4266
|
__name: "InputTextArea",
|
|
4210
4267
|
props: /*@__PURE__*/ g({
|
|
@@ -4232,7 +4289,7 @@ var Da = [
|
|
|
4232
4289
|
emits: ["update:modelValue"],
|
|
4233
4290
|
setup(e, { expose: t }) {
|
|
4234
4291
|
let n = e, { t: r } = K(), o = F(e, "modelValue"), s = i(() => n.maxLength !== void 0 && o.value.length > n.maxLength ? r("ui.input.maxLength", { count: n.maxLength }) : void 0), l = i(() => n.status ?? (s.value ? "error" : void 0)), u = i(() => n.statusText ?? s.value), d = E();
|
|
4235
|
-
return t({ focus: () => d.value?.focus() }), (t, r) => (w(), a(
|
|
4292
|
+
return t({ focus: () => d.value?.focus() }), (t, r) => (w(), a($i, {
|
|
4236
4293
|
label: e.label,
|
|
4237
4294
|
helper: e.helper,
|
|
4238
4295
|
"helper-placement": e.helperPlacement,
|
|
@@ -4254,7 +4311,7 @@ var Da = [
|
|
|
4254
4311
|
"aria-invalid": a,
|
|
4255
4312
|
"aria-describedby": i,
|
|
4256
4313
|
class: "field-sizing-content -my-0.5 max-h-80 min-h-24 min-w-0 flex-1 resize-none bg-transparent text-sm leading-5 outline-none placeholder:text-black/55 disabled:cursor-not-allowed pointer-coarse:text-base"
|
|
4257
|
-
}), null, 16,
|
|
4314
|
+
}), null, 16, Co), [[R, o.value]])]),
|
|
4258
4315
|
_: 1
|
|
4259
4316
|
}, 8, [
|
|
4260
4317
|
"label",
|
|
@@ -4268,7 +4325,7 @@ var Da = [
|
|
|
4268
4325
|
"class"
|
|
4269
4326
|
]));
|
|
4270
4327
|
}
|
|
4271
|
-
}),
|
|
4328
|
+
}), To = { class: "flex items-center gap-1" }, Eo = ["hidden"], Do = ["aria-describedby", "aria-invalid"], Oo = /* @__PURE__ */ f({
|
|
4272
4329
|
__name: "CheckboxGroup",
|
|
4273
4330
|
props: /*@__PURE__*/ g({
|
|
4274
4331
|
label: {},
|
|
@@ -4296,10 +4353,10 @@ var Da = [
|
|
|
4296
4353
|
l.value = t ? [...l.value, e] : l.value.filter((t) => t !== e);
|
|
4297
4354
|
}
|
|
4298
4355
|
return (i, u) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", t.class)) }, [
|
|
4299
|
-
c("div", { class: y(M(X)("flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div",
|
|
4356
|
+
c("div", { class: y(M(X)("flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div", To, [c("span", {
|
|
4300
4357
|
id: f,
|
|
4301
4358
|
class: "text-sm"
|
|
4302
|
-
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(
|
|
4359
|
+
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(Gi, {
|
|
4303
4360
|
key: 0,
|
|
4304
4361
|
text: e.helper,
|
|
4305
4362
|
label: M(r)("ui.formField.about", { label: e.label })
|
|
@@ -4308,14 +4365,14 @@ var Da = [
|
|
|
4308
4365
|
id: p,
|
|
4309
4366
|
hidden: e.helperPlacement === "icon",
|
|
4310
4367
|
class: "text-xs text-black/65"
|
|
4311
|
-
}, j(e.helper), 9,
|
|
4368
|
+
}, j(e.helper), 9, Eo)) : o("", !0)], 2),
|
|
4312
4369
|
c("div", {
|
|
4313
4370
|
role: "group",
|
|
4314
4371
|
"aria-labelledby": f,
|
|
4315
4372
|
"aria-describedby": h.value,
|
|
4316
4373
|
"aria-invalid": e.errorText ? !0 : void 0,
|
|
4317
4374
|
class: "flex flex-col gap-3"
|
|
4318
|
-
}, [(w(!0), s(n, null, D(e.options, (t) => (w(), a(
|
|
4375
|
+
}, [(w(!0), s(n, null, D(e.options, (t) => (w(), a(fo, {
|
|
4319
4376
|
key: String(t.value),
|
|
4320
4377
|
"model-value": l.value.includes(t.value),
|
|
4321
4378
|
label: t.label,
|
|
@@ -4328,15 +4385,15 @@ var Da = [
|
|
|
4328
4385
|
"description",
|
|
4329
4386
|
"disabled",
|
|
4330
4387
|
"onUpdate:modelValue"
|
|
4331
|
-
]))), 128))], 8,
|
|
4332
|
-
d(
|
|
4388
|
+
]))), 128))], 8, Do),
|
|
4389
|
+
d(Ji, {
|
|
4333
4390
|
id: m,
|
|
4334
4391
|
status: e.errorText ? "error" : void 0,
|
|
4335
4392
|
text: e.errorText
|
|
4336
4393
|
}, null, 8, ["status", "text"])
|
|
4337
4394
|
], 2));
|
|
4338
4395
|
}
|
|
4339
|
-
}),
|
|
4396
|
+
}), ko = /* @__PURE__ */ f({
|
|
4340
4397
|
__name: "LanguageSwitcher",
|
|
4341
4398
|
props: {
|
|
4342
4399
|
label: {},
|
|
@@ -4366,7 +4423,7 @@ var Da = [
|
|
|
4366
4423
|
label: s(e),
|
|
4367
4424
|
value: e
|
|
4368
4425
|
})));
|
|
4369
|
-
return (i, o) => (w(), a(
|
|
4426
|
+
return (i, o) => (w(), a(lo, {
|
|
4370
4427
|
modelValue: M(r),
|
|
4371
4428
|
"onUpdate:modelValue": o[0] ||= (e) => h(r) ? r.value = e : null,
|
|
4372
4429
|
label: e.label ?? M(n)("ui.languageSwitcher.label"),
|
|
@@ -4386,7 +4443,123 @@ var Da = [
|
|
|
4386
4443
|
"class"
|
|
4387
4444
|
]));
|
|
4388
4445
|
}
|
|
4389
|
-
}),
|
|
4446
|
+
}), Ao = { class: "flex items-center gap-1" }, jo = ["hidden"], Mo = { class: "flex min-w-0 flex-1 flex-col gap-0.5" }, No = { class: "text-sm font-bold" }, Po = ["id"], Fo = /* @__PURE__ */ f({
|
|
4447
|
+
__name: "CardSelect",
|
|
4448
|
+
props: /*@__PURE__*/ g({
|
|
4449
|
+
label: {},
|
|
4450
|
+
options: {},
|
|
4451
|
+
hideLabel: { type: Boolean },
|
|
4452
|
+
helper: {},
|
|
4453
|
+
helperPlacement: { default: "below" },
|
|
4454
|
+
errorText: {},
|
|
4455
|
+
columns: {},
|
|
4456
|
+
name: {},
|
|
4457
|
+
required: { type: Boolean },
|
|
4458
|
+
disabled: { type: Boolean },
|
|
4459
|
+
class: { type: [
|
|
4460
|
+
Boolean,
|
|
4461
|
+
null,
|
|
4462
|
+
String,
|
|
4463
|
+
Object,
|
|
4464
|
+
Array
|
|
4465
|
+
] }
|
|
4466
|
+
}, {
|
|
4467
|
+
modelValue: {},
|
|
4468
|
+
modelModifiers: {}
|
|
4469
|
+
}),
|
|
4470
|
+
emits: ["update:modelValue"],
|
|
4471
|
+
setup(e) {
|
|
4472
|
+
let { t } = K(), r = e, l = F(e, "modelValue"), u = P(), f = `${u}-label`, p = `${u}-helper`, m = `${u}-status`, h = i(() => [r.helper && p, r.errorText && m].filter(Boolean).join(" ") || void 0), g = i(() => {
|
|
4473
|
+
switch (r.columns) {
|
|
4474
|
+
case 1: return "grid-cols-1";
|
|
4475
|
+
case 2: return "grid-cols-1 sm:grid-cols-2";
|
|
4476
|
+
case 3: return "grid-cols-1 sm:grid-cols-3";
|
|
4477
|
+
case 4: return "grid-cols-2 md:grid-cols-4";
|
|
4478
|
+
default: return "grid-cols-[repeat(auto-fit,minmax(min(10rem,100%),1fr))]";
|
|
4479
|
+
}
|
|
4480
|
+
}), _ = [
|
|
4481
|
+
"group relative flex w-full cursor-pointer items-start gap-3 rounded-lg border border-black/15 bg-white p-3 text-left text-black transition-colors",
|
|
4482
|
+
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus",
|
|
4483
|
+
"not-disabled:not-data-[state=checked]:hover:bg-surface-elevated",
|
|
4484
|
+
"data-[state=checked]:border-primary data-[state=checked]:bg-primary/6 data-[state=checked]:shadow-[inset_0_0_0_1px_var(--color-primary)]",
|
|
4485
|
+
"disabled:cursor-not-allowed disabled:opacity-40",
|
|
4486
|
+
"motion-reduce:transition-none"
|
|
4487
|
+
];
|
|
4488
|
+
return (i, v) => (w(), s("div", { class: y(M(X)("flex flex-col gap-2 text-black", e.disabled && "opacity-40", r.class)) }, [
|
|
4489
|
+
c("div", { class: y(M(X)("flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div", Ao, [c("span", {
|
|
4490
|
+
id: f,
|
|
4491
|
+
class: "text-sm"
|
|
4492
|
+
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(Gi, {
|
|
4493
|
+
key: 0,
|
|
4494
|
+
text: e.helper,
|
|
4495
|
+
label: M(t)("ui.formField.about", { label: e.label })
|
|
4496
|
+
}, null, 8, ["text", "label"])) : o("", !0)]), e.helper ? (w(), s("p", {
|
|
4497
|
+
key: 0,
|
|
4498
|
+
id: p,
|
|
4499
|
+
hidden: e.helperPlacement === "icon",
|
|
4500
|
+
class: "text-xs text-black/65"
|
|
4501
|
+
}, j(e.helper), 9, jo)) : o("", !0)], 2),
|
|
4502
|
+
d(M(Bt), {
|
|
4503
|
+
modelValue: l.value,
|
|
4504
|
+
"onUpdate:modelValue": v[0] ||= (e) => l.value = e,
|
|
4505
|
+
name: e.name,
|
|
4506
|
+
required: e.required,
|
|
4507
|
+
disabled: e.disabled,
|
|
4508
|
+
"aria-labelledby": f,
|
|
4509
|
+
"aria-describedby": h.value,
|
|
4510
|
+
"aria-invalid": e.errorText ? !0 : void 0,
|
|
4511
|
+
class: y(M(X)("grid gap-2", g.value))
|
|
4512
|
+
}, {
|
|
4513
|
+
default: V(() => [(w(!0), s(n, null, D(e.options, (t, n) => (w(), a(M(zt), {
|
|
4514
|
+
id: `${M(u)}-${n}`,
|
|
4515
|
+
key: String(t.value),
|
|
4516
|
+
value: t.value,
|
|
4517
|
+
disabled: t.disabled,
|
|
4518
|
+
"aria-describedby": t.description ? `${M(u)}-${n}-description` : void 0,
|
|
4519
|
+
class: y(M(X)(_, e.errorText && "not-data-[state=checked]:border-red"))
|
|
4520
|
+
}, {
|
|
4521
|
+
default: V(() => [
|
|
4522
|
+
t.icon ? (w(), a(k(t.icon), {
|
|
4523
|
+
key: 0,
|
|
4524
|
+
"aria-hidden": "true",
|
|
4525
|
+
class: "mt-0.5 size-4 shrink-0 text-black/65 group-data-[state=checked]:text-primary"
|
|
4526
|
+
})) : o("", !0),
|
|
4527
|
+
c("span", Mo, [c("span", No, j(t.title), 1), t.description ? (w(), s("span", {
|
|
4528
|
+
key: 0,
|
|
4529
|
+
id: `${M(u)}-${n}-description`,
|
|
4530
|
+
class: "text-xs text-black/65"
|
|
4531
|
+
}, j(t.description), 9, Po)) : o("", !0)]),
|
|
4532
|
+
v[1] ||= c("span", {
|
|
4533
|
+
"aria-hidden": "true",
|
|
4534
|
+
class: "mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border border-black/55 bg-white group-data-[state=checked]:border-primary"
|
|
4535
|
+
}, [c("span", { class: "size-2 scale-0 rounded-full bg-primary transition-transform group-data-[state=checked]:scale-100 motion-reduce:transition-none" })], -1)
|
|
4536
|
+
]),
|
|
4537
|
+
_: 2
|
|
4538
|
+
}, 1032, [
|
|
4539
|
+
"id",
|
|
4540
|
+
"value",
|
|
4541
|
+
"disabled",
|
|
4542
|
+
"aria-describedby",
|
|
4543
|
+
"class"
|
|
4544
|
+
]))), 128))]),
|
|
4545
|
+
_: 1
|
|
4546
|
+
}, 8, [
|
|
4547
|
+
"modelValue",
|
|
4548
|
+
"name",
|
|
4549
|
+
"required",
|
|
4550
|
+
"disabled",
|
|
4551
|
+
"aria-describedby",
|
|
4552
|
+
"aria-invalid",
|
|
4553
|
+
"class"
|
|
4554
|
+
]),
|
|
4555
|
+
d(Ji, {
|
|
4556
|
+
id: m,
|
|
4557
|
+
status: e.errorText ? "error" : void 0,
|
|
4558
|
+
text: e.errorText
|
|
4559
|
+
}, null, 8, ["status", "text"])
|
|
4560
|
+
], 2));
|
|
4561
|
+
}
|
|
4562
|
+
}), Io = /* @__PURE__ */ f({
|
|
4390
4563
|
__name: "EmptyState",
|
|
4391
4564
|
props: {
|
|
4392
4565
|
title: {},
|
|
@@ -4442,15 +4615,15 @@ var Da = [
|
|
|
4442
4615
|
}, [O(r.$slots, "actions")], 2)) : o("", !0)
|
|
4443
4616
|
], 2));
|
|
4444
4617
|
}
|
|
4445
|
-
}),
|
|
4618
|
+
}), Lo = new Intl.Collator("en-GB", {
|
|
4446
4619
|
numeric: !0,
|
|
4447
4620
|
sensitivity: "base"
|
|
4448
4621
|
});
|
|
4449
|
-
function
|
|
4622
|
+
function Ro(e, t) {
|
|
4450
4623
|
let n = e == null || e === "", r = t == null || t === "";
|
|
4451
|
-
return n || r ? n === r ? 0 : n ? 1 : -1 : typeof e == "number" && typeof t == "number" ? e - t : e instanceof Date && t instanceof Date ? e.getTime() - t.getTime() : typeof e == "boolean" && typeof t == "boolean" ? Number(e) - Number(t) :
|
|
4624
|
+
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) : Lo.compare(String(e), String(t));
|
|
4452
4625
|
}
|
|
4453
|
-
function
|
|
4626
|
+
function zo(e, t, n) {
|
|
4454
4627
|
let r = n && t.find((e) => e.key === n.key);
|
|
4455
4628
|
if (!n || !r) return [...e];
|
|
4456
4629
|
let i = r.sortValue ?? ((e) => e[r.key]), a = n.direction === "asc" ? 1 : -1;
|
|
@@ -4460,10 +4633,10 @@ function Eo(e, t, n) {
|
|
|
4460
4633
|
value: i(e)
|
|
4461
4634
|
})).sort((e, t) => {
|
|
4462
4635
|
let n = e.value === null || e.value === void 0 || e.value === "", r = t.value === null || t.value === void 0 || t.value === "";
|
|
4463
|
-
return (n || r ?
|
|
4636
|
+
return (n || r ? Ro(e.value, t.value) : a * Ro(e.value, t.value)) || e.index - t.index;
|
|
4464
4637
|
}).map((e) => e.row);
|
|
4465
4638
|
}
|
|
4466
|
-
function
|
|
4639
|
+
function Bo(e, t) {
|
|
4467
4640
|
return e?.key === t ? e.direction === "asc" ? {
|
|
4468
4641
|
key: t,
|
|
4469
4642
|
direction: "desc"
|
|
@@ -4473,24 +4646,24 @@ function Do(e, t) {
|
|
|
4473
4646
|
};
|
|
4474
4647
|
}
|
|
4475
4648
|
// src/components/Table/Table.vue?vue&type=script&setup=true&lang.ts
|
|
4476
|
-
var
|
|
4649
|
+
var Vo = [
|
|
4477
4650
|
"tabindex",
|
|
4478
4651
|
"role",
|
|
4479
4652
|
"aria-labelledby",
|
|
4480
4653
|
"aria-label"
|
|
4481
|
-
],
|
|
4654
|
+
], Ho = ["aria-busy"], Uo = {
|
|
4482
4655
|
key: 1,
|
|
4483
4656
|
class: "sr-only"
|
|
4484
|
-
},
|
|
4657
|
+
}, Wo = ["aria-sort"], Go = {
|
|
4485
4658
|
key: 0,
|
|
4486
4659
|
class: "sr-only"
|
|
4487
|
-
},
|
|
4660
|
+
}, Ko = ["onClick"], qo = { key: 0 }, Jo = ["colspan"], Yo = {
|
|
4488
4661
|
key: 0,
|
|
4489
4662
|
class: "inline-flex items-center gap-2"
|
|
4490
|
-
},
|
|
4663
|
+
}, Xo = ["onClick"], Zo = {
|
|
4491
4664
|
key: 1,
|
|
4492
4665
|
"aria-hidden": "true"
|
|
4493
|
-
},
|
|
4666
|
+
}, Qo = ["colspan"], $o = "relative z-1 w-0 cursor-pointer", es = "absolute inset-0 outline-none", ts = "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", ns = "outline-2 -outline-offset-2 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", rs = /* @__PURE__ */ f({
|
|
4494
4667
|
__name: "Table",
|
|
4495
4668
|
props: /*@__PURE__*/ g({
|
|
4496
4669
|
columns: {},
|
|
@@ -4540,7 +4713,7 @@ var Oo = [
|
|
|
4540
4713
|
function T(e, t) {
|
|
4541
4714
|
e.target.closest("button, label, .sr-only") || t();
|
|
4542
4715
|
}
|
|
4543
|
-
let A = i(() => r.columns.length + +!!r.selectable), N = i(() => r.manualSort ? r.rows :
|
|
4716
|
+
let A = i(() => r.columns.length + +!!r.selectable), N = i(() => r.manualSort ? r.rows : zo(r.rows, r.columns, l.value));
|
|
4544
4717
|
function I(e, t) {
|
|
4545
4718
|
return typeof r.rowKey == "function" ? r.rowKey(e, t) : r.rowKey ? e[r.rowKey] : t;
|
|
4546
4719
|
}
|
|
@@ -4567,17 +4740,17 @@ var Oo = [
|
|
|
4567
4740
|
function ee(e) {
|
|
4568
4741
|
return X(e.align === "end" && "text-right", e.nowrap !== !1 && "whitespace-nowrap", e.class);
|
|
4569
4742
|
}
|
|
4570
|
-
let W = E(), G = E(!1),
|
|
4571
|
-
function
|
|
4743
|
+
let W = E(), G = E(!1), J;
|
|
4744
|
+
function te() {
|
|
4572
4745
|
let e = W.value;
|
|
4573
4746
|
e && (G.value = e.scrollWidth > e.clientWidth + 1 || e.scrollHeight > e.clientHeight + 1);
|
|
4574
4747
|
}
|
|
4575
4748
|
return C(() => {
|
|
4576
|
-
|
|
4577
|
-
}), S(() =>
|
|
4749
|
+
te(), J = new ResizeObserver(te), W.value && (J.observe(W.value), W.value.firstElementChild && J.observe(W.value.firstElementChild));
|
|
4750
|
+
}), S(() => J?.disconnect()), (i, f) => (w(), s("div", {
|
|
4578
4751
|
ref_key: "scroller",
|
|
4579
4752
|
ref: W,
|
|
4580
|
-
class: y(M(X)("relative overflow-auto", G.value &&
|
|
4753
|
+
class: y(M(X)("relative overflow-auto", G.value && ns, r.class)),
|
|
4581
4754
|
tabindex: G.value ? 0 : void 0,
|
|
4582
4755
|
role: G.value ? "region" : void 0,
|
|
4583
4756
|
"aria-labelledby": G.value && (e.caption || i.$slots.caption) ? p : void 0,
|
|
@@ -4594,29 +4767,29 @@ var Oo = [
|
|
|
4594
4767
|
c("thead", { class: y(M(X)(e.stickyHeader && "sticky top-0 z-10 bg-white", e.ui?.header)) }, [c("tr", null, [e.selectable ? (w(), s("th", {
|
|
4595
4768
|
key: 0,
|
|
4596
4769
|
scope: "col",
|
|
4597
|
-
class: y(M(X)("border-b border-black/15", U.value, h.value.length &&
|
|
4770
|
+
class: y(M(X)("border-b border-black/15", U.value, h.value.length && $o)),
|
|
4598
4771
|
onClick: f[1] ||= (e) => T(e, () => h.value.length && x(b.value !== !0))
|
|
4599
|
-
}, [h.value.length ? (w(), a(
|
|
4772
|
+
}, [h.value.length ? (w(), a(fo, {
|
|
4600
4773
|
key: 0,
|
|
4601
4774
|
"model-value": b.value,
|
|
4602
4775
|
label: M(t)("ui.table.selectAll"),
|
|
4603
4776
|
"hide-label": "",
|
|
4604
4777
|
"onUpdate:modelValue": f[0] ||= (e) => x(e === !0)
|
|
4605
|
-
}, null, 8, ["model-value", "label"])) : (w(), s("span",
|
|
4778
|
+
}, null, 8, ["model-value", "label"])) : (w(), s("span", Uo, j(M(t)("ui.table.select")), 1))], 2)) : o("", !0), (w(!0), s(n, null, D(e.columns, (e) => (w(), s("th", {
|
|
4606
4779
|
key: e.key,
|
|
4607
4780
|
scope: "col",
|
|
4608
4781
|
"aria-sort": L(e),
|
|
4609
4782
|
class: y(M(X)("border-b border-black/15 font-bold text-black/65", U.value, ee(e)))
|
|
4610
|
-
}, [O(i.$slots, `header-${e.key}`, { column: e }, () => [e.hideLabel ? (w(), s("span",
|
|
4783
|
+
}, [O(i.$slots, `header-${e.key}`, { column: e }, () => [e.hideLabel ? (w(), s("span", Go, j(e.label), 1)) : e.sortable ? (w(), s("button", {
|
|
4611
4784
|
key: 1,
|
|
4612
4785
|
type: "button",
|
|
4613
|
-
class: y(M(X)("-mx-1 inline-flex cursor-pointer items-center gap-1 rounded px-1 font-bold hover:text-black", e.align === "end" && "flex-row-reverse", l.value?.key === e.key && "text-black",
|
|
4614
|
-
onClick: (t) => l.value = M(
|
|
4615
|
-
}, [u(j(e.label) + " ", 1), l.value?.key === e.key && l.value.direction === "asc" ? (w(), a(M(
|
|
4786
|
+
class: y(M(X)("-mx-1 inline-flex cursor-pointer items-center gap-1 rounded px-1 font-bold hover:text-black", e.align === "end" && "flex-row-reverse", l.value?.key === e.key && "text-black", ts)),
|
|
4787
|
+
onClick: (t) => l.value = M(Bo)(l.value, e.key)
|
|
4788
|
+
}, [u(j(e.label) + " ", 1), l.value?.key === e.key && l.value.direction === "asc" ? (w(), a(M(re), {
|
|
4616
4789
|
key: 0,
|
|
4617
4790
|
class: "size-4 shrink-0",
|
|
4618
4791
|
"aria-hidden": "true"
|
|
4619
|
-
})) : l.value?.key === e.key ? (w(), a(M(
|
|
4792
|
+
})) : l.value?.key === e.key ? (w(), a(M(q), {
|
|
4620
4793
|
key: 1,
|
|
4621
4794
|
class: "size-4 shrink-0",
|
|
4622
4795
|
"aria-hidden": "true"
|
|
@@ -4624,24 +4797,24 @@ var Oo = [
|
|
|
4624
4797
|
key: 2,
|
|
4625
4798
|
class: "size-4 shrink-0 text-black/40",
|
|
4626
4799
|
"aria-hidden": "true"
|
|
4627
|
-
}))], 10,
|
|
4800
|
+
}))], 10, Ko)) : (w(), s(n, { key: 2 }, [u(j(e.label), 1)], 64))])], 10, Wo))), 128))])], 2),
|
|
4628
4801
|
c("tbody", { class: y(M(X)(e.loading && N.value.length && "opacity-50 transition-opacity")) }, [
|
|
4629
|
-
N.value.length ? o("", !0) : (w(), s("tr",
|
|
4802
|
+
N.value.length ? o("", !0) : (w(), s("tr", qo, [c("td", {
|
|
4630
4803
|
colspan: A.value,
|
|
4631
4804
|
class: "px-4 py-8 text-center text-black/65"
|
|
4632
|
-
}, [e.loading ? (w(), s("span",
|
|
4805
|
+
}, [e.loading ? (w(), s("span", Yo, [d(Rn, { size: "sm" }), f[2] ||= u(" Loading… ", -1)])) : O(i.$slots, "empty", {}, () => [d(Io, {
|
|
4633
4806
|
size: "sm",
|
|
4634
4807
|
description: e.emptyText ?? M(t)("ui.table.empty"),
|
|
4635
4808
|
class: "p-0"
|
|
4636
|
-
}, null, 8, ["description"])], void 0, 1)], 8,
|
|
4809
|
+
}, null, 8, ["description"])], void 0, 1)], 8, Jo)])),
|
|
4637
4810
|
(w(!0), s(n, null, D(N.value, (r, c) => (w(), s("tr", {
|
|
4638
4811
|
key: I(r, c),
|
|
4639
4812
|
class: y(M(X)("group/row", z(r, c) && H, e.ui?.row))
|
|
4640
4813
|
}, [e.selectable ? (w(), s("td", {
|
|
4641
4814
|
key: 0,
|
|
4642
|
-
class: y(M(X)("border-b border-black/15 align-middle", !e.inset && "group-last/row:border-b-0", U.value, m(r) &&
|
|
4815
|
+
class: y(M(X)("border-b border-black/15 align-middle", !e.inset && "group-last/row:border-b-0", U.value, m(r) && $o)),
|
|
4643
4816
|
onClick: (e) => m(r) && T(e, () => v(r, c, !g(r, c)))
|
|
4644
|
-
}, [m(r) ? (w(), a(
|
|
4817
|
+
}, [m(r) ? (w(), a(fo, {
|
|
4645
4818
|
key: 0,
|
|
4646
4819
|
"model-value": g(r, c),
|
|
4647
4820
|
label: e.rowLabel ? e.rowLabel(r, c) : M(t)("ui.table.selectRow", { n: c + 1 }),
|
|
@@ -4651,7 +4824,7 @@ var Oo = [
|
|
|
4651
4824
|
"model-value",
|
|
4652
4825
|
"label",
|
|
4653
4826
|
"onUpdate:modelValue"
|
|
4654
|
-
])) : o("", !0)], 10,
|
|
4827
|
+
])) : o("", !0)], 10, Xo)) : o("", !0), (w(!0), s(n, null, D(e.columns, (t) => (w(), a(k(t.rowHeader ? "th" : "td"), {
|
|
4655
4828
|
key: t.key,
|
|
4656
4829
|
scope: t.rowHeader ? "row" : void 0,
|
|
4657
4830
|
class: y(M(X)("border-b border-black/15 align-middle", !e.inset && "group-last/row:border-b-0", t.rowHeader ? "font-bold" : "font-normal", t.align === "end" && "tabular-nums", U.value, z(r, c) && "relative", ee(t)))
|
|
@@ -4663,7 +4836,7 @@ var Oo = [
|
|
|
4663
4836
|
"data-row-overlay": "",
|
|
4664
4837
|
tabindex: "-1",
|
|
4665
4838
|
"aria-hidden": "true",
|
|
4666
|
-
class:
|
|
4839
|
+
class: es
|
|
4667
4840
|
}), null, 16)) : o("", !0), t.key === R.value && z(r, c) ? (w(), a(k(e.linkComponent), _({
|
|
4668
4841
|
key: 1,
|
|
4669
4842
|
ref_for: !0
|
|
@@ -4684,33 +4857,33 @@ var Oo = [
|
|
|
4684
4857
|
}, () => [u(j(r[t.key] ?? ""), 1)], void 0, 2)]),
|
|
4685
4858
|
_: 2
|
|
4686
4859
|
}, 1032, ["scope", "class"]))), 128))], 2))), 128)),
|
|
4687
|
-
e.inset && N.value.length && !i.$slots.footer ? (w(), s("tr",
|
|
4860
|
+
e.inset && N.value.length && !i.$slots.footer ? (w(), s("tr", Zo, [c("td", {
|
|
4688
4861
|
colspan: A.value,
|
|
4689
4862
|
class: "h-2 p-0 sm:h-4"
|
|
4690
|
-
}, null, 8,
|
|
4863
|
+
}, null, 8, Qo)])) : o("", !0)
|
|
4691
4864
|
], 2),
|
|
4692
4865
|
i.$slots.footer ? (w(), s("tfoot", {
|
|
4693
4866
|
key: 1,
|
|
4694
4867
|
class: y(M(X)("font-bold *:*:border-t *:*:border-black/15", e.size === "sm" ? "*:*:px-4 *:*:py-2" : "*:*:px-4 *:*:py-3", e.inset && "*:*:sm:first:pl-6 *:*:sm:last:pr-6"))
|
|
4695
4868
|
}, [O(i.$slots, "footer")], 2)) : o("", !0)
|
|
4696
|
-
], 10,
|
|
4869
|
+
], 10, Ho)], 10, Vo));
|
|
4697
4870
|
}
|
|
4698
|
-
}),
|
|
4871
|
+
}), is = { class: "flex items-center gap-2 text-sm text-black/65" }, as = { class: "flex flex-wrap items-baseline gap-x-2 gap-y-1" }, os = { class: "text-2xl font-bold tabular-nums" }, ss = {
|
|
4699
4872
|
key: 1,
|
|
4700
4873
|
class: "sr-only"
|
|
4701
|
-
},
|
|
4874
|
+
}, cs = {
|
|
4702
4875
|
key: 2,
|
|
4703
4876
|
class: "font-bold tabular-nums"
|
|
4704
|
-
},
|
|
4877
|
+
}, ls = {
|
|
4705
4878
|
key: 3,
|
|
4706
4879
|
class: "text-black/65"
|
|
4707
|
-
},
|
|
4880
|
+
}, us = {
|
|
4708
4881
|
key: 0,
|
|
4709
4882
|
class: "text-sm text-black/65"
|
|
4710
|
-
},
|
|
4883
|
+
}, ds = {
|
|
4711
4884
|
key: 1,
|
|
4712
4885
|
class: "mt-2 text-sm"
|
|
4713
|
-
},
|
|
4886
|
+
}, fs = /* @__PURE__ */ f({
|
|
4714
4887
|
__name: "StatTile",
|
|
4715
4888
|
props: {
|
|
4716
4889
|
label: {},
|
|
@@ -4734,23 +4907,23 @@ var Oo = [
|
|
|
4734
4907
|
positive: "text-green",
|
|
4735
4908
|
negative: "text-red",
|
|
4736
4909
|
neutral: "text-black/65"
|
|
4737
|
-
}, d = i(() => n.trend === "up" ? ie : n.trend === "down" ?
|
|
4910
|
+
}, d = i(() => n.trend === "up" ? ie : n.trend === "down" ? J : n.trend === "flat" ? ne : void 0), f = i(() => ({
|
|
4738
4911
|
up: t("ui.statTile.up"),
|
|
4739
4912
|
down: t("ui.statTile.down"),
|
|
4740
4913
|
flat: t("ui.statTile.flat")
|
|
4741
4914
|
}));
|
|
4742
|
-
return (t, i) => (w(), a(
|
|
4915
|
+
return (t, i) => (w(), a(Ai, {
|
|
4743
4916
|
padding: "sm",
|
|
4744
4917
|
class: y(n.class),
|
|
4745
4918
|
ui: { body: "gap-1" }
|
|
4746
4919
|
}, {
|
|
4747
4920
|
default: V(() => [
|
|
4748
|
-
c("p",
|
|
4921
|
+
c("p", is, [e.icon ? (w(), a(k(e.icon), {
|
|
4749
4922
|
key: 0,
|
|
4750
4923
|
class: "size-4 shrink-0",
|
|
4751
4924
|
"aria-hidden": "true"
|
|
4752
4925
|
})) : o("", !0), u(" " + j(e.label), 1)]),
|
|
4753
|
-
c("div",
|
|
4926
|
+
c("div", as, [c("p", os, [O(t.$slots, "value", {}, () => [u(j(e.value ?? "—"), 1)])]), e.change || e.trend ? (w(), s("p", {
|
|
4754
4927
|
key: 0,
|
|
4755
4928
|
class: y(M(X)("inline-flex items-center gap-0.5 text-sm", l[r.value]))
|
|
4756
4929
|
}, [
|
|
@@ -4759,29 +4932,29 @@ var Oo = [
|
|
|
4759
4932
|
class: "size-4 shrink-0",
|
|
4760
4933
|
"aria-hidden": "true"
|
|
4761
4934
|
})) : o("", !0),
|
|
4762
|
-
e.trend ? (w(), s("span",
|
|
4763
|
-
e.change ? (w(), s("span",
|
|
4764
|
-
e.changeLabel ? (w(), s("span",
|
|
4935
|
+
e.trend ? (w(), s("span", ss, j(f.value[e.trend]), 1)) : o("", !0),
|
|
4936
|
+
e.change ? (w(), s("span", cs, j(e.change), 1)) : o("", !0),
|
|
4937
|
+
e.changeLabel ? (w(), s("span", ls, "\xA0" + j(e.changeLabel), 1)) : o("", !0)
|
|
4765
4938
|
], 2)) : o("", !0)]),
|
|
4766
|
-
e.description || t.$slots.description ? (w(), s("p",
|
|
4767
|
-
t.$slots.footer ? (w(), s("div",
|
|
4939
|
+
e.description || t.$slots.description ? (w(), s("p", us, [O(t.$slots, "description", {}, () => [u(j(e.description), 1)])])) : o("", !0),
|
|
4940
|
+
t.$slots.footer ? (w(), s("div", ds, [O(t.$slots, "footer")])) : o("", !0)
|
|
4768
4941
|
]),
|
|
4769
4942
|
_: 3
|
|
4770
4943
|
}, 8, ["class"]));
|
|
4771
4944
|
}
|
|
4772
|
-
}),
|
|
4945
|
+
}), ps = { class: "col-span-2 text-black/65 @sm:col-span-1" }, ms = { class: "sr-only" }, hs = {
|
|
4773
4946
|
key: 0,
|
|
4774
4947
|
class: "mt-0.5 block text-black/65"
|
|
4775
|
-
},
|
|
4948
|
+
}, gs = {
|
|
4776
4949
|
key: 0,
|
|
4777
4950
|
class: "justify-self-end"
|
|
4778
|
-
},
|
|
4951
|
+
}, _s = { class: "text-black/65" }, vs = { class: "sr-only" }, ys = {
|
|
4779
4952
|
key: 0,
|
|
4780
4953
|
class: "mt-0.5 block font-normal text-black/65"
|
|
4781
|
-
},
|
|
4954
|
+
}, bs = {
|
|
4782
4955
|
key: 1,
|
|
4783
4956
|
class: "mt-1 block font-normal"
|
|
4784
|
-
},
|
|
4957
|
+
}, xs = /* @__PURE__ */ f({
|
|
4785
4958
|
__name: "SummaryList",
|
|
4786
4959
|
props: {
|
|
4787
4960
|
items: {},
|
|
@@ -4806,40 +4979,41 @@ var Oo = [
|
|
|
4806
4979
|
key: r.label,
|
|
4807
4980
|
class: y(M(X)("grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 border-b border-black/15 py-3 first:pt-0 last:border-b-0 last:pb-0", a[e.labelWidth]))
|
|
4808
4981
|
}, [
|
|
4809
|
-
c("dt",
|
|
4982
|
+
c("dt", ps, j(r.label), 1),
|
|
4810
4983
|
c("dd", { class: y(M(X)("min-w-0 break-words", r.emphasis && "font-bold", !l.$slots.action && "col-span-2")) }, [O(l.$slots, "value", {
|
|
4811
4984
|
item: r,
|
|
4812
4985
|
index: f
|
|
4813
4986
|
}, () => [i(r.value) ? (w(), s(n, { key: 1 }, [d[0] ||= c("span", {
|
|
4814
4987
|
class: "text-black/40",
|
|
4815
4988
|
"aria-hidden": "true"
|
|
4816
|
-
}, "—", -1), c("span",
|
|
4817
|
-
l.$slots.action ? (w(), s("dd",
|
|
4989
|
+
}, "—", -1), c("span", ms, 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", hs, j(r.description), 1)) : o("", !0)], 2),
|
|
4990
|
+
l.$slots.action ? (w(), s("dd", gs, [O(l.$slots, "action", {
|
|
4818
4991
|
item: r,
|
|
4819
4992
|
index: f
|
|
4820
4993
|
})])) : o("", !0)
|
|
4821
4994
|
], 2))), 128)) : (w(!0), s(n, { key: 1 }, D(e.items, (r, a) => (w(), s("div", {
|
|
4822
4995
|
key: r.label,
|
|
4823
4996
|
class: y(e.layout === "compact" ? "col-span-2 grid grid-cols-subgrid items-baseline" : "flex min-w-0 flex-col gap-1")
|
|
4824
|
-
}, [c("dt",
|
|
4997
|
+
}, [c("dt", _s, j(r.label), 1), c("dd", { class: y(M(X)("min-w-0 break-words", e.layout === "compact" && "text-right font-bold tabular-nums", r.emphasis && "font-bold")) }, [
|
|
4825
4998
|
O(l.$slots, "value", {
|
|
4826
4999
|
item: r,
|
|
4827
5000
|
index: a
|
|
4828
5001
|
}, () => [i(r.value) ? (w(), s(n, { key: 1 }, [d[1] ||= c("span", {
|
|
4829
5002
|
class: "text-black/40",
|
|
4830
5003
|
"aria-hidden": "true"
|
|
4831
|
-
}, "—", -1), c("span",
|
|
4832
|
-
r.description ? (w(), s("span",
|
|
4833
|
-
l.$slots.action ? (w(), s("span",
|
|
5004
|
+
}, "—", -1), c("span", vs, j(e.emptyLabel ?? M(t)("ui.summaryList.notSet")), 1)], 64)) : (w(), s(n, { key: 0 }, [u(j(r.value), 1)], 64))]),
|
|
5005
|
+
r.description ? (w(), s("span", ys, j(r.description), 1)) : o("", !0),
|
|
5006
|
+
l.$slots.action ? (w(), s("span", bs, [O(l.$slots, "action", {
|
|
4834
5007
|
item: r,
|
|
4835
5008
|
index: a
|
|
4836
5009
|
})])) : o("", !0)
|
|
4837
5010
|
], 2)], 2))), 128))], 2)], 2));
|
|
4838
5011
|
}
|
|
4839
|
-
}),
|
|
5012
|
+
}), Ss = { class: "flex h-5 shrink-0 items-center" }, Cs = { class: "sr-only" }, ws = /* @__PURE__ */ f({
|
|
4840
5013
|
__name: "Checklist",
|
|
4841
5014
|
props: {
|
|
4842
5015
|
items: {},
|
|
5016
|
+
invalid: { type: Boolean },
|
|
4843
5017
|
class: { type: [
|
|
4844
5018
|
Boolean,
|
|
4845
5019
|
null,
|
|
@@ -4850,22 +5024,22 @@ var Oo = [
|
|
|
4850
5024
|
},
|
|
4851
5025
|
setup(e) {
|
|
4852
5026
|
let t = e;
|
|
4853
|
-
return (r, i) => (w(), s("ul", { class: y(M(X)("flex flex-col gap-2 text-sm", t.class)) }, [(w(!0), s(n, null, D(e.items, (
|
|
4854
|
-
key:
|
|
5027
|
+
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", {
|
|
5028
|
+
key: t.label,
|
|
4855
5029
|
class: "flex items-start gap-2"
|
|
4856
|
-
}, [c("span",
|
|
5030
|
+
}, [c("span", Ss, [t.done ? (w(), a(M(ge), {
|
|
4857
5031
|
key: 0,
|
|
4858
5032
|
class: "size-4 text-green",
|
|
4859
5033
|
"aria-hidden": "true"
|
|
4860
5034
|
})) : (w(), a(M(me), {
|
|
4861
5035
|
key: 1,
|
|
4862
|
-
class: "size-4 text-black/40",
|
|
5036
|
+
class: y(M(X)("size-4", e.invalid ? "text-red" : "text-black/40")),
|
|
4863
5037
|
"aria-hidden": "true"
|
|
4864
|
-
}))]), c("span", { class: y(
|
|
5038
|
+
}, null, 8, ["class"]))]), c("span", { class: y(t.done ? "text-black" : "text-black/65") }, [u(j(t.label), 1), c("span", Cs, j(t.done ? " (done)" : " (to do)"), 1)], 2)]))), 128))], 2));
|
|
4865
5039
|
}
|
|
4866
5040
|
});
|
|
4867
5041
|
// src/lib/dates.ts
|
|
4868
|
-
function
|
|
5042
|
+
function Ts(e) {
|
|
4869
5043
|
if (e instanceof Date) return e;
|
|
4870
5044
|
if (typeof e == "string" && /^\d{4}-\d{2}-\d{2}$/.test(e)) {
|
|
4871
5045
|
let [t, n, r] = e.split("-").map(Number);
|
|
@@ -4873,59 +5047,59 @@ function fs(e) {
|
|
|
4873
5047
|
}
|
|
4874
5048
|
return new Date(e);
|
|
4875
5049
|
}
|
|
4876
|
-
var
|
|
5050
|
+
var Es = [
|
|
4877
5051
|
["year", 31536e3],
|
|
4878
5052
|
["month", 2592e3],
|
|
4879
5053
|
["week", 604800],
|
|
4880
5054
|
["day", 86400],
|
|
4881
5055
|
["hour", 3600],
|
|
4882
5056
|
["minute", 60]
|
|
4883
|
-
],
|
|
4884
|
-
function
|
|
4885
|
-
let n = Math.round((
|
|
5057
|
+
], Ds = new Intl.RelativeTimeFormat("en-GB", { numeric: "auto" });
|
|
5058
|
+
function Os(e, t = /* @__PURE__ */ new Date()) {
|
|
5059
|
+
let n = Math.round((Ts(e).getTime() - t.getTime()) / 1e3);
|
|
4886
5060
|
if (Math.abs(n) < 60) return "Just now";
|
|
4887
|
-
for (let [e, t] of
|
|
4888
|
-
let r =
|
|
5061
|
+
for (let [e, t] of Es) if (Math.abs(n) >= t) {
|
|
5062
|
+
let r = Ds.format(Math.trunc(n / t), e);
|
|
4889
5063
|
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
4890
5064
|
}
|
|
4891
5065
|
return "Just now";
|
|
4892
5066
|
}
|
|
4893
|
-
function
|
|
4894
|
-
let t =
|
|
5067
|
+
function ks(e) {
|
|
5068
|
+
let t = Ts(e), n = t.toLocaleDateString("en-GB", { weekday: "long" }), r = t.toLocaleTimeString("en-GB", {
|
|
4895
5069
|
hour: "2-digit",
|
|
4896
5070
|
minute: "2-digit"
|
|
4897
5071
|
});
|
|
4898
|
-
return `${n} ${
|
|
5072
|
+
return `${n} ${As(t)} at ${r}`;
|
|
4899
5073
|
}
|
|
4900
|
-
function
|
|
4901
|
-
return
|
|
5074
|
+
function As(e) {
|
|
5075
|
+
return Ts(e).toLocaleDateString("en-GB", {
|
|
4902
5076
|
day: "numeric",
|
|
4903
5077
|
month: "long",
|
|
4904
5078
|
year: "numeric"
|
|
4905
5079
|
});
|
|
4906
5080
|
}
|
|
4907
|
-
function
|
|
4908
|
-
let n =
|
|
5081
|
+
function js(e, t = /* @__PURE__ */ new Date()) {
|
|
5082
|
+
let n = Ts(e), r = t.getFullYear() - n.getFullYear(), i = t.getMonth() - n.getMonth();
|
|
4909
5083
|
return (i < 0 || i === 0 && t.getDate() < n.getDate()) && r--, r;
|
|
4910
5084
|
}
|
|
4911
|
-
function
|
|
4912
|
-
let n =
|
|
5085
|
+
function Ms(e, t = /* @__PURE__ */ new Date()) {
|
|
5086
|
+
let n = Ts(e), r = new Date(t.getFullYear(), t.getMonth(), t.getDate()), i = (e) => {
|
|
4913
5087
|
let t = new Date(e, n.getMonth(), n.getDate());
|
|
4914
5088
|
return t.getMonth() === n.getMonth() ? t : new Date(e, 2, 1);
|
|
4915
5089
|
}, a = i(r.getFullYear());
|
|
4916
5090
|
return a < r && (a = i(r.getFullYear() + 1)), Math.round((a.getTime() - r.getTime()) / 864e5);
|
|
4917
5091
|
}
|
|
4918
5092
|
// src/lib/useNow.ts
|
|
4919
|
-
var
|
|
4920
|
-
function
|
|
5093
|
+
var Ns = E(/* @__PURE__ */ new Date()), Ps = 0, Fs;
|
|
5094
|
+
function Is() {
|
|
4921
5095
|
return C(() => {
|
|
4922
|
-
|
|
5096
|
+
Ps++ === 0 && (Ns.value = /* @__PURE__ */ new Date(), Fs = setInterval(() => Ns.value = /* @__PURE__ */ new Date(), 3e4));
|
|
4923
5097
|
}), S(() => {
|
|
4924
|
-
--
|
|
4925
|
-
}),
|
|
5098
|
+
--Ps === 0 && clearInterval(Fs);
|
|
5099
|
+
}), Ns;
|
|
4926
5100
|
}
|
|
4927
5101
|
// src/components/RelativeTime/RelativeTime.vue?vue&type=script&setup=true&lang.ts
|
|
4928
|
-
var
|
|
5102
|
+
var Ls = ["datetime"], Rs = /* @__PURE__ */ f({
|
|
4929
5103
|
__name: "RelativeTime",
|
|
4930
5104
|
props: {
|
|
4931
5105
|
date: {},
|
|
@@ -4940,17 +5114,17 @@ var ws = ["datetime"], Ts = /* @__PURE__ */ f({
|
|
|
4940
5114
|
] }
|
|
4941
5115
|
},
|
|
4942
5116
|
setup(e) {
|
|
4943
|
-
let t = e, n =
|
|
4944
|
-
return (e, n) => (w(), a(
|
|
5117
|
+
let t = e, n = Is(), r = i(() => Ts(t.date)), o = i(() => Os(r.value, t.now ?? n.value)), s = i(() => t.tooltip ? t.tooltip(r.value) : ks(r.value));
|
|
5118
|
+
return (e, n) => (w(), a(La, { text: s.value }, {
|
|
4945
5119
|
default: V(() => [c("time", {
|
|
4946
5120
|
datetime: r.value.toISOString(),
|
|
4947
5121
|
tabindex: "0",
|
|
4948
5122
|
class: y(M(X)("cursor-default rounded-sm underline decoration-current/40 decoration-dotted underline-offset-2", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", t.class))
|
|
4949
|
-
}, j(o.value), 11,
|
|
5123
|
+
}, j(o.value), 11, Ls)]),
|
|
4950
5124
|
_: 1
|
|
4951
5125
|
}, 8, ["text"]));
|
|
4952
5126
|
}
|
|
4953
|
-
}),
|
|
5127
|
+
}), zs = ["data-birth-date"], Bs = /* @__PURE__ */ f({
|
|
4954
5128
|
__name: "Age",
|
|
4955
5129
|
props: {
|
|
4956
5130
|
birthDate: {},
|
|
@@ -4965,23 +5139,23 @@ var ws = ["datetime"], Ts = /* @__PURE__ */ f({
|
|
|
4965
5139
|
] }
|
|
4966
5140
|
},
|
|
4967
5141
|
setup(e) {
|
|
4968
|
-
let { t } = K(), r = e, l =
|
|
4969
|
-
let e =
|
|
4970
|
-
return `${t("ui.age.born", { date:
|
|
5142
|
+
let { t } = K(), r = e, l = Is(), d = i(() => Ts(r.birthDate)), f = i(() => r.now ?? l.value), p = i(() => js(d.value, f.value)), m = i(() => {
|
|
5143
|
+
let e = Ms(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 })}` : "";
|
|
5144
|
+
return `${t("ui.age.born", { date: As(d.value) })}${n}`;
|
|
4971
5145
|
}), h = i(() => {
|
|
4972
5146
|
let e = d.value;
|
|
4973
5147
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
4974
5148
|
});
|
|
4975
|
-
return (t, i) => (w(), a(
|
|
5149
|
+
return (t, i) => (w(), a(La, { text: m.value }, {
|
|
4976
5150
|
default: V(() => [c("span", {
|
|
4977
5151
|
tabindex: "0",
|
|
4978
5152
|
"data-birth-date": h.value,
|
|
4979
5153
|
class: y(M(X)("cursor-default rounded-sm tabular-nums underline decoration-current/40 decoration-dotted underline-offset-2", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", r.class))
|
|
4980
|
-
}, [u(j(p.value), 1), e.suffix ? (w(), s(n, { key: 0 }, [u("\xA0" + j(e.suffix), 1)], 64)) : o("", !0)], 10,
|
|
5154
|
+
}, [u(j(p.value), 1), e.suffix ? (w(), s(n, { key: 0 }, [u("\xA0" + j(e.suffix), 1)], 64)) : o("", !0)], 10, zs)]),
|
|
4981
5155
|
_: 1
|
|
4982
5156
|
}, 8, ["text"]));
|
|
4983
5157
|
}
|
|
4984
|
-
}),
|
|
5158
|
+
}), Vs = /* @__PURE__ */ f({
|
|
4985
5159
|
__name: "Link",
|
|
4986
5160
|
props: {
|
|
4987
5161
|
href: {},
|
|
@@ -5028,10 +5202,10 @@ var ws = ["datetime"], Ts = /* @__PURE__ */ f({
|
|
|
5028
5202
|
"class"
|
|
5029
5203
|
]));
|
|
5030
5204
|
}
|
|
5031
|
-
}),
|
|
5205
|
+
}), Hs = {
|
|
5032
5206
|
class: "text-sm text-black/65",
|
|
5033
5207
|
"aria-live": "polite"
|
|
5034
|
-
},
|
|
5208
|
+
}, Us = { class: "text-black" }, Ws = /* @__PURE__ */ f({
|
|
5035
5209
|
__name: "Steps",
|
|
5036
5210
|
props: {
|
|
5037
5211
|
steps: {},
|
|
@@ -5047,7 +5221,16 @@ var ws = ["datetime"], Ts = /* @__PURE__ */ f({
|
|
|
5047
5221
|
},
|
|
5048
5222
|
setup(e) {
|
|
5049
5223
|
let t = e;
|
|
5050
|
-
return (n, r) => (w(), s("div", { class: y(M(X)("flex flex-col gap-3", t.class)) }, [d(
|
|
5224
|
+
return (n, r) => (w(), s("div", { class: y(M(X)("flex flex-col gap-3", t.class)) }, [c("p", Hs, [d(M(W), {
|
|
5225
|
+
keypath: "ui.steps.stepOfNamed",
|
|
5226
|
+
scope: "global",
|
|
5227
|
+
tag: "span"
|
|
5228
|
+
}, {
|
|
5229
|
+
current: V(() => [u(j(e.step + 1), 1)]),
|
|
5230
|
+
total: V(() => [u(j(e.steps.length), 1)]),
|
|
5231
|
+
name: V(() => [c("span", Us, j(e.steps[e.step]), 1)]),
|
|
5232
|
+
_: 1
|
|
5233
|
+
})]), d(Lr, {
|
|
5051
5234
|
label: e.label,
|
|
5052
5235
|
segments: "",
|
|
5053
5236
|
value: e.step + 1,
|
|
@@ -5056,18 +5239,9 @@ var ws = ["datetime"], Ts = /* @__PURE__ */ f({
|
|
|
5056
5239
|
"label",
|
|
5057
5240
|
"value",
|
|
5058
5241
|
"max"
|
|
5059
|
-
]),
|
|
5060
|
-
keypath: "ui.steps.stepOfNamed",
|
|
5061
|
-
scope: "global",
|
|
5062
|
-
tag: "span"
|
|
5063
|
-
}, {
|
|
5064
|
-
current: V(() => [u(j(e.step + 1), 1)]),
|
|
5065
|
-
total: V(() => [u(j(e.steps.length), 1)]),
|
|
5066
|
-
name: V(() => [c("span", As, j(e.steps[e.step]), 1)]),
|
|
5067
|
-
_: 1
|
|
5068
|
-
})])], 2));
|
|
5242
|
+
])], 2));
|
|
5069
5243
|
}
|
|
5070
|
-
}),
|
|
5244
|
+
}), Gs = /* @__PURE__ */ f({
|
|
5071
5245
|
__name: "Tabs",
|
|
5072
5246
|
props: /*@__PURE__*/ g({
|
|
5073
5247
|
tabs: {},
|
|
@@ -5129,11 +5303,11 @@ var ws = ["datetime"], Ts = /* @__PURE__ */ f({
|
|
|
5129
5303
|
_: 3
|
|
5130
5304
|
}, 8, ["model-value", "class"]));
|
|
5131
5305
|
}
|
|
5132
|
-
}),
|
|
5133
|
-
function
|
|
5306
|
+
}), Ks = 0, qs = () => `notification-${Date.now().toString(36)}-${(Ks++).toString(36)}`;
|
|
5307
|
+
function Js(e, t) {
|
|
5134
5308
|
return t === void 0 ? e.type === "error" ? Infinity : e.action ? e.compact ? 1e4 : Infinity : 6e3 : t;
|
|
5135
5309
|
}
|
|
5136
|
-
function
|
|
5310
|
+
function Ys(e = []) {
|
|
5137
5311
|
let t = T({
|
|
5138
5312
|
items: e.map(n).sort((e, t) => t.createdAt.getTime() - e.createdAt.getTime()),
|
|
5139
5313
|
toasts: [],
|
|
@@ -5143,7 +5317,7 @@ function Is(e = []) {
|
|
|
5143
5317
|
function n(e) {
|
|
5144
5318
|
return {
|
|
5145
5319
|
...e,
|
|
5146
|
-
id: e.id ??
|
|
5320
|
+
id: e.id ?? qs(),
|
|
5147
5321
|
type: e.type ?? "info",
|
|
5148
5322
|
createdAt: e.createdAt ?? /* @__PURE__ */ new Date(),
|
|
5149
5323
|
read: e.read ?? !1
|
|
@@ -5153,7 +5327,7 @@ function Is(e = []) {
|
|
|
5153
5327
|
let i = n(e);
|
|
5154
5328
|
return t.items = [i, ...t.items.filter((e) => e.id !== i.id)], r.toast !== !1 && !t.paneOpen && (t.toasts = [...t.toasts.filter((e) => e.id !== i.id), {
|
|
5155
5329
|
id: i.id,
|
|
5156
|
-
duration:
|
|
5330
|
+
duration: Js(i, r.duration),
|
|
5157
5331
|
item: i
|
|
5158
5332
|
}]), i.id;
|
|
5159
5333
|
}
|
|
@@ -5202,25 +5376,25 @@ function Is(e = []) {
|
|
|
5202
5376
|
markAllRead: c
|
|
5203
5377
|
};
|
|
5204
5378
|
}
|
|
5205
|
-
var
|
|
5206
|
-
function
|
|
5207
|
-
return
|
|
5379
|
+
var Xs;
|
|
5380
|
+
function Zs() {
|
|
5381
|
+
return Xs ??= Ys();
|
|
5208
5382
|
}
|
|
5209
5383
|
// src/components/Notification/Notification.vue?vue&type=script&setup=true&lang.ts
|
|
5210
|
-
var
|
|
5384
|
+
var Qs = { class: "sr-only" }, $s = {
|
|
5211
5385
|
key: 0,
|
|
5212
5386
|
class: "text-black/65 [&_a]:font-bold [&_a]:text-primary [&_a]:underline [&_b]:font-bold [&_b]:text-black [&_strong]:font-bold [&_strong]:text-black"
|
|
5213
|
-
},
|
|
5387
|
+
}, ec = {
|
|
5214
5388
|
key: 1,
|
|
5215
5389
|
class: "flex items-center gap-1.5 text-xs text-black/65"
|
|
5216
|
-
},
|
|
5390
|
+
}, tc = {
|
|
5217
5391
|
key: 0,
|
|
5218
5392
|
class: "size-2 shrink-0 rounded-full bg-primary",
|
|
5219
5393
|
"aria-hidden": "true"
|
|
5220
|
-
},
|
|
5394
|
+
}, nc = {
|
|
5221
5395
|
key: 1,
|
|
5222
5396
|
class: "sr-only"
|
|
5223
|
-
},
|
|
5397
|
+
}, rc = ["href"], ic = /* @__PURE__ */ f({
|
|
5224
5398
|
__name: "Notification",
|
|
5225
5399
|
props: {
|
|
5226
5400
|
type: { default: "info" },
|
|
@@ -5285,12 +5459,12 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5285
5459
|
c("p", {
|
|
5286
5460
|
id: f,
|
|
5287
5461
|
class: y(M(X)("font-bold", h.value && "min-w-0 flex-1 py-1"))
|
|
5288
|
-
}, [c("span",
|
|
5289
|
-
!h.value && (e.description || t.$slots.default) ? (w(), s("div",
|
|
5290
|
-
e.appearance === "row" && (e.createdAt || e.unread) ? (w(), s("p",
|
|
5291
|
-
e.unread ? (w(), s("span",
|
|
5292
|
-
e.unread ? (w(), s("span",
|
|
5293
|
-
e.createdAt ? (w(), a(
|
|
5462
|
+
}, [c("span", Qs, j(p[e.type].word) + ": ", 1), u(j(e.title), 1)], 2),
|
|
5463
|
+
!h.value && (e.description || t.$slots.default) ? (w(), s("div", $s, [O(t.$slots, "default", {}, () => [d(m)])])) : o("", !0),
|
|
5464
|
+
e.appearance === "row" && (e.createdAt || e.unread) ? (w(), s("p", ec, [
|
|
5465
|
+
e.unread ? (w(), s("span", tc)) : o("", !0),
|
|
5466
|
+
e.unread ? (w(), s("span", nc, "Unread, ")) : o("", !0),
|
|
5467
|
+
e.createdAt ? (w(), a(Rs, {
|
|
5294
5468
|
key: 2,
|
|
5295
5469
|
date: e.createdAt,
|
|
5296
5470
|
now: e.now
|
|
@@ -5305,7 +5479,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5305
5479
|
"as-child": "",
|
|
5306
5480
|
onClick: g
|
|
5307
5481
|
}, {
|
|
5308
|
-
default: V(() => [c("a", { href: e.action.href }, j(e.action.label), 9,
|
|
5482
|
+
default: V(() => [c("a", { href: e.action.href }, j(e.action.label), 9, rc)]),
|
|
5309
5483
|
_: 1
|
|
5310
5484
|
})) : e.action ? (w(), a(Z, {
|
|
5311
5485
|
key: 1,
|
|
@@ -5331,11 +5505,11 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5331
5505
|
}, 8, ["class", "aria-label"])) : o("", !0)
|
|
5332
5506
|
], 2));
|
|
5333
5507
|
}
|
|
5334
|
-
}),
|
|
5508
|
+
}), ac = {
|
|
5335
5509
|
key: 0,
|
|
5336
5510
|
class: "absolute top-1 left-1/2 ml-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red px-1 text-xs leading-none font-bold text-white ring-2 ring-white",
|
|
5337
5511
|
"aria-hidden": "true"
|
|
5338
|
-
},
|
|
5512
|
+
}, oc = { class: "flex h-11 shrink-0 items-center justify-between gap-2 border-b border-black/15 pr-2 pl-4" }, sc = ["inert"], cc = /* @__PURE__ */ f({
|
|
5339
5513
|
__name: "NotificationPane",
|
|
5340
5514
|
props: /*@__PURE__*/ g({
|
|
5341
5515
|
notifications: {},
|
|
@@ -5351,7 +5525,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5351
5525
|
}),
|
|
5352
5526
|
emits: ["update:open"],
|
|
5353
5527
|
setup(e) {
|
|
5354
|
-
let { t } = K(), r = e, l = F(e, "open"), f = i(() => r.notifications ??
|
|
5528
|
+
let { t } = K(), r = e, l = F(e, "open"), f = i(() => r.notifications ?? Zs()), p = i(() => f.value.items), m = i(() => f.value.unreadCount.value), h = i(() => m.value > 99 ? "99+" : String(m.value)), g = i(() => r.label ?? t("ui.notifications.title")), _ = i(() => m.value ? t("ui.notifications.withUnread", {
|
|
5355
5529
|
label: g.value,
|
|
5356
5530
|
count: h.value
|
|
5357
5531
|
}) : g.value), b = `${P()}-heading`, x = E(), S = E();
|
|
@@ -5401,7 +5575,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5401
5575
|
ref: C,
|
|
5402
5576
|
"aria-labelledby": b,
|
|
5403
5577
|
class: "flex min-h-0 flex-col"
|
|
5404
|
-
}, [c("div",
|
|
5578
|
+
}, [c("div", oc, [c("h2", {
|
|
5405
5579
|
id: b,
|
|
5406
5580
|
ref_key: "heading",
|
|
5407
5581
|
ref: x,
|
|
@@ -5426,7 +5600,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5426
5600
|
}, [(w(!0), s(n, null, D(p.value, (e, t) => (w(), s("li", {
|
|
5427
5601
|
key: e.id,
|
|
5428
5602
|
class: "border-b border-black/15 last:border-b-0"
|
|
5429
|
-
}, [d(
|
|
5603
|
+
}, [d(ic, {
|
|
5430
5604
|
appearance: "row",
|
|
5431
5605
|
type: e.type,
|
|
5432
5606
|
title: e.title,
|
|
@@ -5445,7 +5619,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5445
5619
|
"unread",
|
|
5446
5620
|
"onDismiss",
|
|
5447
5621
|
"onAction"
|
|
5448
|
-
])]))), 128))], 42,
|
|
5622
|
+
])]))), 128))], 42, sc)) : (w(), a(Io, {
|
|
5449
5623
|
key: 1,
|
|
5450
5624
|
size: "sm",
|
|
5451
5625
|
icon: M(oe),
|
|
@@ -5464,13 +5638,13 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5464
5638
|
"aria-label": _.value,
|
|
5465
5639
|
class: y(M(X)("relative overflow-visible", e.ui?.trigger))
|
|
5466
5640
|
}, {
|
|
5467
|
-
default: V(() => [d(M(ae)), m.value ? (w(), s("span",
|
|
5641
|
+
default: V(() => [d(M(ae)), m.value ? (w(), s("span", ac, j(h.value), 1)) : o("", !0)]),
|
|
5468
5642
|
_: 1
|
|
5469
5643
|
}, 8, ["aria-label", "class"])]),
|
|
5470
5644
|
_: 1
|
|
5471
5645
|
}, 8, ["open", "ui"]));
|
|
5472
5646
|
}
|
|
5473
|
-
}),
|
|
5647
|
+
}), lc = { class: "in-data-expanded:hidden" }, uc = { class: "hidden in-data-expanded:inline" }, dc = { class: "sr-only" }, fc = 8, pc = .5, mc = 80, hc = /* @__PURE__ */ f({
|
|
5474
5648
|
__name: "Toaster",
|
|
5475
5649
|
props: {
|
|
5476
5650
|
notifications: {},
|
|
@@ -5487,15 +5661,15 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5487
5661
|
},
|
|
5488
5662
|
emits: ["more"],
|
|
5489
5663
|
setup(e, { emit: t }) {
|
|
5490
|
-
let { t: r } = K(), l = e, f = t, p = i(() => l.notifications ??
|
|
5664
|
+
let { t: r } = K(), l = e, f = t, p = i(() => l.notifications ?? Zs()), m = i(() => l.position === "top-right"), h = E(typeof window > "u" ? 800 : window.innerHeight), g = () => h.value = window.innerHeight;
|
|
5491
5665
|
C(() => window.addEventListener("resize", g)), S(() => window.removeEventListener("resize", g));
|
|
5492
|
-
let _ = i(() => Math.max(h.value -
|
|
5493
|
-
let e = p.value.toasts.slice(-l.limit).reverse(), t = (e) => L.get(e.id) ?? b(e.item), n = e.filter((e) => !W.has(e.id)), r = n.reduce((e, n) => e + t(n) +
|
|
5666
|
+
let _ = i(() => Math.max(h.value - mc, 108)), b = (e) => e.compact ? 42 : e.action ? 116 : e.description ? 78 : 56, O = i(() => {
|
|
5667
|
+
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) + fc, -8), i = /* @__PURE__ */ new Set();
|
|
5494
5668
|
if (r <= _.value) n.forEach((e) => i.add(e.id));
|
|
5495
5669
|
else {
|
|
5496
5670
|
let e = 44;
|
|
5497
5671
|
for (let r of n) {
|
|
5498
|
-
let n = e + t(r) + (i.size ?
|
|
5672
|
+
let n = e + t(r) + (i.size ? fc : 0);
|
|
5499
5673
|
if (i.size && n > _.value) break;
|
|
5500
5674
|
i.add(r.id), e = n;
|
|
5501
5675
|
}
|
|
@@ -5520,7 +5694,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5520
5694
|
z(() => p.value.paneOpen, (e) => {
|
|
5521
5695
|
if (!e) return;
|
|
5522
5696
|
let t = new Set(k.value.map((e) => e.id));
|
|
5523
|
-
for (let e of [...p.value.toasts]) t.has(e.id) ?
|
|
5697
|
+
for (let e of [...p.value.toasts]) t.has(e.id) ? q(e.id, !1) : p.value.hideToast(e.id);
|
|
5524
5698
|
});
|
|
5525
5699
|
function I() {
|
|
5526
5700
|
p.value.openPane(), f("more");
|
|
@@ -5543,23 +5717,23 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5543
5717
|
})));
|
|
5544
5718
|
}
|
|
5545
5719
|
let W = T(/* @__PURE__ */ new Set()), G = /* @__PURE__ */ new Map();
|
|
5546
|
-
function
|
|
5720
|
+
function q(e, t) {
|
|
5547
5721
|
t || W.has(e) || (W.add(e), setTimeout(() => {
|
|
5548
5722
|
p.value.hideToast(e), W.delete(e), U.delete(e), G.delete(e), L.delete(e);
|
|
5549
5723
|
}, 200));
|
|
5550
5724
|
}
|
|
5551
|
-
let
|
|
5725
|
+
let J = i(() => {
|
|
5552
5726
|
let e = k.value.filter((e) => !W.has(e.id)), t = /* @__PURE__ */ new Map(), n = [], r = 0;
|
|
5553
|
-
for (let t of e) n.push(r), r += (L.get(t.id) ?? 0) +
|
|
5554
|
-
let i = Math.max(r -
|
|
5727
|
+
for (let t of e) n.push(r), r += (L.get(t.id) ?? 0) + fc;
|
|
5728
|
+
let i = Math.max(r - fc, 0), a = Math.min(l.maxHeight, _.value), o = 0;
|
|
5555
5729
|
for (; o < e.length && (o === 0 || n[o] + (L.get(e[o].id) ?? 0) <= a);) o++;
|
|
5556
|
-
let s = e[o - 1], c = n[o - 1] ?? 0, u = s ? L.get(s.id) ?? 0 : 0, d = c + u +
|
|
5730
|
+
let s = e[o - 1], c = n[o - 1] ?? 0, u = s ? L.get(s.id) ?? 0 : 0, d = c + u + fc;
|
|
5557
5731
|
e.forEach((r, i) => {
|
|
5558
5732
|
let a = i >= o;
|
|
5559
5733
|
t.set(r.id, {
|
|
5560
5734
|
spread: n[i],
|
|
5561
5735
|
stacked: a ? d : n[i],
|
|
5562
|
-
scale: a ?
|
|
5736
|
+
scale: a ? pc : 1,
|
|
5563
5737
|
opacity: +!a,
|
|
5564
5738
|
z: e.length - i
|
|
5565
5739
|
});
|
|
@@ -5570,19 +5744,19 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5570
5744
|
places: t,
|
|
5571
5745
|
spreadHeight: i + (A.value > 0 ? 44 : 0),
|
|
5572
5746
|
stackedHeight: p,
|
|
5573
|
-
moreOffset: i + (i ?
|
|
5747
|
+
moreOffset: i + (i ? fc : 0),
|
|
5574
5748
|
notInView: f,
|
|
5575
5749
|
pillOffset: d
|
|
5576
5750
|
};
|
|
5577
5751
|
});
|
|
5578
|
-
function
|
|
5579
|
-
let t = W.has(e) ? G.get(e) :
|
|
5580
|
-
"--toast-spread": r(
|
|
5581
|
-
"--toast-stacked": r(
|
|
5582
|
-
"--toast-scale":
|
|
5752
|
+
function te(e) {
|
|
5753
|
+
let t = W.has(e) ? G.get(e) : J.value.places.get(e), n = m.value ? 1 : -1, r = (e) => `${n * e}px`, i = {
|
|
5754
|
+
"--toast-spread": r(J.value.moreOffset),
|
|
5755
|
+
"--toast-stacked": r(J.value.pillOffset),
|
|
5756
|
+
"--toast-scale": pc,
|
|
5583
5757
|
"--toast-opacity": 0,
|
|
5584
5758
|
"--toast-spread-opacity": 0,
|
|
5585
|
-
"--toast-spread-scale":
|
|
5759
|
+
"--toast-spread-scale": pc,
|
|
5586
5760
|
"--toast-z": 0
|
|
5587
5761
|
};
|
|
5588
5762
|
if (!t && N.has(e) || t && !U.has(e) && P.has(e)) return i;
|
|
@@ -5608,9 +5782,9 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5608
5782
|
"--toast-z": t.z
|
|
5609
5783
|
};
|
|
5610
5784
|
}
|
|
5611
|
-
let
|
|
5612
|
-
"--toast-more": `${
|
|
5613
|
-
"--toast-pill": `${
|
|
5785
|
+
let ne = i(() => m.value ? 1 : -1), re = i(() => ({
|
|
5786
|
+
"--toast-more": `${ne.value * J.value.moreOffset}px`,
|
|
5787
|
+
"--toast-pill": `${ne.value * J.value.pillOffset}px`
|
|
5614
5788
|
}));
|
|
5615
5789
|
function ie(e) {
|
|
5616
5790
|
e.currentTarget.closest("[data-expanded]") ? I() : ae();
|
|
@@ -5620,8 +5794,8 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5620
5794
|
(e && R.get(e.id)?.parentElement)?.focus({ focusVisible: !1 });
|
|
5621
5795
|
}
|
|
5622
5796
|
let oe = i(() => ({
|
|
5623
|
-
"--toast-stack-spread": `${
|
|
5624
|
-
"--toast-stack-stacked": `${
|
|
5797
|
+
"--toast-stack-spread": `${J.value.spreadHeight}px`,
|
|
5798
|
+
"--toast-stack-stacked": `${J.value.stackedHeight}px`
|
|
5625
5799
|
})), se = {
|
|
5626
5800
|
"bottom-right": "right-4 bottom-4 left-4 sm:left-auto sm:w-96",
|
|
5627
5801
|
"top-right": "top-16 right-4 left-4 sm:left-auto sm:w-96",
|
|
@@ -5636,11 +5810,11 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5636
5810
|
open: !W.has(e.id),
|
|
5637
5811
|
duration: e.duration,
|
|
5638
5812
|
type: e.item.type === "error" || e.item.type === "warning" ? "foreground" : "background",
|
|
5639
|
-
style: x(
|
|
5813
|
+
style: x(te(e.id)),
|
|
5640
5814
|
class: y(M(X)("absolute inset-x-0 z-(--toast-z) list-none rounded", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", m.value ? "top-0 origin-top" : "bottom-0 origin-bottom", "translate-y-(--toast-stacked) scale-(--toast-scale) opacity-(--toast-opacity)", "data-expanded:translate-y-(--toast-spread) data-expanded:scale-(--toast-spread-scale) data-expanded:opacity-(--toast-spread-opacity)", "transition-[translate,scale,opacity] duration-300 ease-out motion-reduce:transition-none", "data-[state=closed]:animate-fade-out", "data-[swipe=move]:translate-x-(--reka-toast-swipe-move-x) data-[swipe=move]:transition-none", "data-[swipe=cancel]:translate-x-0", "data-[swipe=end]:animate-slide-out-right")),
|
|
5641
|
-
"onUpdate:open": (t) =>
|
|
5815
|
+
"onUpdate:open": (t) => q(e.id, t)
|
|
5642
5816
|
}, {
|
|
5643
|
-
default: V(() => [d(
|
|
5817
|
+
default: V(() => [d(ic, {
|
|
5644
5818
|
ref_for: !0,
|
|
5645
5819
|
ref: (t) => H(e.id, t),
|
|
5646
5820
|
type: e.item.type,
|
|
@@ -5650,8 +5824,8 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5650
5824
|
compact: e.item.compact,
|
|
5651
5825
|
class: "shadow-md",
|
|
5652
5826
|
"dismiss-label": M(r)("ui.notifications.close", { title: e.item.title }),
|
|
5653
|
-
onDismiss: (t) =>
|
|
5654
|
-
onAction: (t) =>
|
|
5827
|
+
onDismiss: (t) => q(e.id, !1),
|
|
5828
|
+
onAction: (t) => q(e.id, !1)
|
|
5655
5829
|
}, null, 8, [
|
|
5656
5830
|
"type",
|
|
5657
5831
|
"title",
|
|
@@ -5675,15 +5849,15 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5675
5849
|
style: x(oe.value),
|
|
5676
5850
|
class: y(M(X)("fixed z-100 m-0 list-none p-0 outline-none", "h-(--toast-stack-stacked) data-expanded:h-(--toast-stack-spread)", se[e.position], l.class))
|
|
5677
5851
|
}, {
|
|
5678
|
-
default: V(() => [
|
|
5852
|
+
default: V(() => [J.value.notInView ? (w(), s("li", {
|
|
5679
5853
|
key: 0,
|
|
5680
|
-
style: x(
|
|
5854
|
+
style: x(re.value),
|
|
5681
5855
|
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"))
|
|
5682
5856
|
}, [c("button", {
|
|
5683
5857
|
type: "button",
|
|
5684
5858
|
class: y(M(X)("flex cursor-pointer items-center justify-center overflow-hidden border border-black/15 bg-white font-bold whitespace-nowrap text-black shadow-md hover:bg-surface-elevated", "h-7 w-24 rounded-2xl text-xs", A.value && "in-data-expanded:h-9 in-data-expanded:w-full in-data-expanded:rounded in-data-expanded:text-sm", "transition-[width,height,border-radius,font-size,background-color] duration-300 ease-out motion-reduce:transition-none", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0")),
|
|
5685
5859
|
onClick: ie
|
|
5686
|
-
}, [A.value ? (w(), s(n, { key: 0 }, [c("span",
|
|
5860
|
+
}, [A.value ? (w(), s(n, { key: 0 }, [c("span", lc, 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", dc, "\xA0" + j(M(r)("ui.notifications.notifications")), 1)], 2)], 6)) : o("", !0)]),
|
|
5687
5861
|
_: 1
|
|
5688
5862
|
}, 8, [
|
|
5689
5863
|
"label",
|
|
@@ -5693,7 +5867,69 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5693
5867
|
_: 1
|
|
5694
5868
|
}, 8, ["label"]));
|
|
5695
5869
|
}
|
|
5696
|
-
}),
|
|
5870
|
+
}), gc = {
|
|
5871
|
+
key: 0,
|
|
5872
|
+
"aria-hidden": "true",
|
|
5873
|
+
class: "h-20"
|
|
5874
|
+
}, _c = ["aria-label"], vc = { class: "pointer-events-auto flex w-full max-w-2xl items-center justify-between gap-3 rounded-lg border border-black/15 bg-white p-3 pl-4 shadow-lg" }, yc = {
|
|
5875
|
+
role: "status",
|
|
5876
|
+
class: "flex items-center gap-2 text-sm font-bold"
|
|
5877
|
+
}, bc = { class: "flex shrink-0 items-center gap-2" }, xc = /* @__PURE__ */ f({
|
|
5878
|
+
__name: "UnsavedChangesBar",
|
|
5879
|
+
props: {
|
|
5880
|
+
open: { type: Boolean },
|
|
5881
|
+
message: {},
|
|
5882
|
+
discardLabel: {},
|
|
5883
|
+
saveLabel: {},
|
|
5884
|
+
status: { default: "idle" },
|
|
5885
|
+
reserveSpace: {
|
|
5886
|
+
type: Boolean,
|
|
5887
|
+
default: !0
|
|
5888
|
+
},
|
|
5889
|
+
class: { type: [
|
|
5890
|
+
Boolean,
|
|
5891
|
+
null,
|
|
5892
|
+
String,
|
|
5893
|
+
Object,
|
|
5894
|
+
Array
|
|
5895
|
+
] }
|
|
5896
|
+
},
|
|
5897
|
+
emits: ["discard", "save"],
|
|
5898
|
+
setup(e, { emit: t }) {
|
|
5899
|
+
let { t: a } = K(), l = e, f = t, p = i(() => l.status === "loading");
|
|
5900
|
+
return (t, i) => (w(), s(n, null, [e.open && e.reserveSpace ? (w(), s("div", gc)) : o("", !0), d(r, {
|
|
5901
|
+
"enter-active-class": "transition duration-300 ease-out motion-reduce:transition-none",
|
|
5902
|
+
"leave-active-class": "transition duration-200 ease-in motion-reduce:transition-none",
|
|
5903
|
+
"enter-from-class": "translate-y-full motion-reduce:translate-y-0 motion-reduce:opacity-0",
|
|
5904
|
+
"leave-to-class": "translate-y-full motion-reduce:translate-y-0 motion-reduce:opacity-0"
|
|
5905
|
+
}, {
|
|
5906
|
+
default: V(() => [e.open ? (w(), s("div", {
|
|
5907
|
+
key: 0,
|
|
5908
|
+
role: "region",
|
|
5909
|
+
"aria-label": e.message ?? M(a)("ui.unsavedChangesBar.message"),
|
|
5910
|
+
class: y(M(X)("fixed inset-x-0 bottom-0 z-40 flex justify-center px-4 pb-4 pointer-events-none", l.class))
|
|
5911
|
+
}, [c("div", vc, [c("p", yc, [i[2] ||= c("span", {
|
|
5912
|
+
"aria-hidden": "true",
|
|
5913
|
+
class: "size-2 shrink-0 rounded-full bg-yellow"
|
|
5914
|
+
}, null, -1), u(" " + j(e.message ?? M(a)("ui.unsavedChangesBar.message")), 1)]), c("div", bc, [d(Z, {
|
|
5915
|
+
disabled: p.value,
|
|
5916
|
+
onClick: i[0] ||= (e) => f("discard")
|
|
5917
|
+
}, {
|
|
5918
|
+
default: V(() => [u(j(e.discardLabel ?? M(a)("ui.unsavedChangesBar.discard")), 1)]),
|
|
5919
|
+
_: 1
|
|
5920
|
+
}, 8, ["disabled"]), d(Z, {
|
|
5921
|
+
variant: "primary",
|
|
5922
|
+
status: e.status,
|
|
5923
|
+
disabled: p.value,
|
|
5924
|
+
onClick: i[1] ||= (e) => f("save")
|
|
5925
|
+
}, {
|
|
5926
|
+
default: V(() => [u(j(e.saveLabel ?? M(a)("ui.unsavedChangesBar.save")), 1)]),
|
|
5927
|
+
_: 1
|
|
5928
|
+
}, 8, ["status", "disabled"])])])], 10, _c)) : o("", !0)]),
|
|
5929
|
+
_: 1
|
|
5930
|
+
})], 64));
|
|
5931
|
+
}
|
|
5932
|
+
}), Sc = { ui: {
|
|
5697
5933
|
age: {
|
|
5698
5934
|
born: "Born {date}",
|
|
5699
5935
|
birthdayToday: "Birthday today",
|
|
@@ -5724,6 +5960,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5724
5960
|
chooseMonth: "Choose month",
|
|
5725
5961
|
chooseYear: "Choose year"
|
|
5726
5962
|
},
|
|
5963
|
+
changeIndicator: { changed: "Changed from {from} to {to}" },
|
|
5727
5964
|
chip: { remove: "Remove" },
|
|
5728
5965
|
formField: { about: "About {label}" },
|
|
5729
5966
|
header: {
|
|
@@ -5808,17 +6045,22 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5808
6045
|
selectAll: "Select all rows",
|
|
5809
6046
|
selectRow: "Select row {n}",
|
|
5810
6047
|
select: "Select"
|
|
6048
|
+
},
|
|
6049
|
+
unsavedChangesBar: {
|
|
6050
|
+
message: "Unsaved changes",
|
|
6051
|
+
discard: "Discard",
|
|
6052
|
+
save: "Save"
|
|
5811
6053
|
}
|
|
5812
|
-
} },
|
|
5813
|
-
function
|
|
5814
|
-
let { messages: t = {}, fallbackLocale: n = "en", storageKey: r = "keston-locale" } = e, i = [.../* @__PURE__ */ new Set([...Object.keys(
|
|
6054
|
+
} }, Cc = { en: Sc };
|
|
6055
|
+
function wc(e = {}) {
|
|
6056
|
+
let { messages: t = {}, fallbackLocale: n = "en", storageKey: r = "keston-locale" } = e, i = [.../* @__PURE__ */ new Set([...Object.keys(Cc), ...Object.keys(t)])], a = {};
|
|
5815
6057
|
for (let e of i) a[e] = {
|
|
5816
|
-
...
|
|
6058
|
+
...Cc[e],
|
|
5817
6059
|
...t[e]
|
|
5818
6060
|
};
|
|
5819
6061
|
let o = G({
|
|
5820
6062
|
legacy: !1,
|
|
5821
|
-
locale: e.locale ??
|
|
6063
|
+
locale: e.locale ?? Tc(i, n, r),
|
|
5822
6064
|
fallbackLocale: n,
|
|
5823
6065
|
messages: a
|
|
5824
6066
|
});
|
|
@@ -5829,7 +6071,7 @@ function ac(e = {}) {
|
|
|
5829
6071
|
typeof document < "u" && (document.documentElement.lang = e);
|
|
5830
6072
|
}, { immediate: !0 }), o;
|
|
5831
6073
|
}
|
|
5832
|
-
function
|
|
6074
|
+
function Tc(e, t, n) {
|
|
5833
6075
|
try {
|
|
5834
6076
|
let t = localStorage.getItem(n);
|
|
5835
6077
|
if (t && e.includes(t)) return t;
|
|
@@ -5840,4 +6082,4 @@ function oc(e, t, n) {
|
|
|
5840
6082
|
}
|
|
5841
6083
|
return t;
|
|
5842
6084
|
}
|
|
5843
|
-
export {
|
|
6085
|
+
export { Bs as Age, Xr as AppShell, ur as Avatar, Ei as AvatarGroup, br as Badge, ai as Breadcrumb, Z as Button, pa as Calendar, Ai as Card, Fo as CardSelect, Hi as ChangeIndicator, fo as Checkbox, Oo as CheckboxGroup, ws as Checklist, Ni as Chip, Ii as Divider, Io as EmptyState, $i as FormField, vr as Header, Gi as InfoTip, ta as Input, Ya as InputCode, Ia as InputDate, ia as InputNumber, Wa as InputPassword, Ba as InputRichText, wo as InputTextArea, ko as LanguageSwitcher, Vs as Link, oi as Menu, ic as Notification, cc as NotificationPane, mi as PageHeader, Jn as Popover, Lr as Progress, yo as RadioGroup, Rs as RelativeTime, lo as Select, yi as SettingsRow, Pr as Sidebar, Kr as Slideover, Rn as Spinner, fs as StatTile, Ws as Steps, xs as SummaryList, So as Switch, rs as Table, Gs as Tabs, hc as Toaster, La as Tooltip, xc as UnsavedChangesBar, js as age, X as cn, wc as createKestonI18n, Ys as createNotifications, Ms as daysToBirthday, Sc as en, As as formatDate, ks as formatDateTime, Os as relativeTime, xr as sidebarTrail, zo as sortRows, Ts as toDate, Cc as uiMessages, Zs as useNotifications, Is as useNow };
|