@thekestongroup/ui 0.9.2 → 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/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 +612 -384
- 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/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";
|
|
@@ -596,7 +596,7 @@ var Kn = ["z-50 rounded border border-black/15 bg-white text-black shadow-md out
|
|
|
596
596
|
key: 0,
|
|
597
597
|
onClick: (e) => g("switch-account", n)
|
|
598
598
|
}, {
|
|
599
|
-
leading: V(() => [d(M(
|
|
599
|
+
leading: V(() => [d(M(te))]),
|
|
600
600
|
default: V(() => [i[3] ||= u(" Switch account ", -1)]),
|
|
601
601
|
_: 1
|
|
602
602
|
}, 8, ["onClick"])) : o("", !0), e.userActions.includes("log-out") ? (w(), a(Z, {
|
|
@@ -769,10 +769,10 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
769
769
|
"aria-disabled": !0
|
|
770
770
|
} : e.to === void 0 ? { href: e.href } : { to: e.to };
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function q(e, t) {
|
|
773
773
|
e.disabled ? t.preventDefault() : e.children?.length ? U(e) : (e.onSelect?.(t), p("select", e, t));
|
|
774
774
|
}
|
|
775
|
-
let
|
|
775
|
+
let J = [
|
|
776
776
|
"flex h-9.5 w-full items-center gap-3 overflow-hidden rounded px-3 text-left text-sm whitespace-nowrap select-none",
|
|
777
777
|
"cursor-pointer transition [&_svg]:size-4 [&_svg]:shrink-0",
|
|
778
778
|
"outline-2 -outline-offset-2 outline-transparent forced-colors:not-focus-visible:outline-0",
|
|
@@ -802,7 +802,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
802
802
|
type: "button",
|
|
803
803
|
"data-back": "",
|
|
804
804
|
title: m.value ? M(l)("ui.sidebar.backFrom", { name: S.value.label }) : void 0,
|
|
805
|
-
class: y(M(X)(
|
|
805
|
+
class: y(M(X)(J, "font-bold", e.ui?.item)),
|
|
806
806
|
onClick: ee
|
|
807
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", {
|
|
808
808
|
key: i,
|
|
@@ -821,8 +821,8 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
821
821
|
"data-parent": n.children?.length ? n.label : void 0,
|
|
822
822
|
"aria-current": n.active ? "page" : void 0,
|
|
823
823
|
title: m.value ? n.label : void 0,
|
|
824
|
-
class: M(X)(
|
|
825
|
-
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)
|
|
826
826
|
}), {
|
|
827
827
|
default: V(() => [O(t.$slots, "item", {
|
|
828
828
|
item: n,
|
|
@@ -1038,12 +1038,12 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1038
1038
|
let n = t.querySelector("[autofocus], [data-autofocus]"), i = window.matchMedia("(pointer: coarse)").matches ? null : t.querySelector(H), a = n ?? i;
|
|
1039
1039
|
a && (e.preventDefault(), a.focus());
|
|
1040
1040
|
}
|
|
1041
|
-
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 = {
|
|
1042
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",
|
|
1043
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",
|
|
1044
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",
|
|
1045
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"
|
|
1046
|
-
},
|
|
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"];
|
|
1047
1047
|
return (t, r) => (w(), a(M(ht), {
|
|
1048
1048
|
open: m.value,
|
|
1049
1049
|
modal: e.modal,
|
|
@@ -1063,7 +1063,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1063
1063
|
key: 0,
|
|
1064
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))
|
|
1065
1065
|
}, null, 8, ["class"])) : o("", !0), d(M(dt), _(e.content, {
|
|
1066
|
-
class: M(X)(
|
|
1066
|
+
class: M(X)(J, q[e.side], e.ui?.content),
|
|
1067
1067
|
onEscapeKeyDown: B,
|
|
1068
1068
|
onInteractOutside: B,
|
|
1069
1069
|
onOpenAutoFocus: W
|
|
@@ -1912,7 +1912,51 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1912
1912
|
"class"
|
|
1913
1913
|
]));
|
|
1914
1914
|
}
|
|
1915
|
-
})
|
|
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({
|
|
1916
1960
|
__name: "InfoTip",
|
|
1917
1961
|
props: {
|
|
1918
1962
|
text: {},
|
|
@@ -1934,7 +1978,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1934
1978
|
sideOffset: 6
|
|
1935
1979
|
}
|
|
1936
1980
|
}, {
|
|
1937
|
-
content: V(() => [c("p",
|
|
1981
|
+
content: V(() => [c("p", Wi, j(e.text), 1)]),
|
|
1938
1982
|
default: V(() => [c("button", {
|
|
1939
1983
|
type: "button",
|
|
1940
1984
|
"aria-label": e.label,
|
|
@@ -1943,11 +1987,11 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1943
1987
|
}, [d(M(_e), { "aria-hidden": "true" }), c("span", {
|
|
1944
1988
|
id: n,
|
|
1945
1989
|
hidden: ""
|
|
1946
|
-
}, j(e.text), 1)], 10,
|
|
1990
|
+
}, j(e.text), 1)], 10, Ui)]),
|
|
1947
1991
|
_: 1
|
|
1948
1992
|
}));
|
|
1949
1993
|
}
|
|
1950
|
-
}),
|
|
1994
|
+
}), Ki = { class: "overflow-hidden" }, qi = ["id"], Ji = /* @__PURE__ */ f({
|
|
1951
1995
|
__name: "FieldMessage",
|
|
1952
1996
|
props: {
|
|
1953
1997
|
id: {},
|
|
@@ -1970,7 +2014,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1970
2014
|
return (t, i) => (w(), s(n, null, [c("div", {
|
|
1971
2015
|
"aria-hidden": "true",
|
|
1972
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"))
|
|
1973
|
-
}, [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, {
|
|
1974
2018
|
key: 0,
|
|
1975
2019
|
size: "sm",
|
|
1976
2020
|
class: "size-3.5"
|
|
@@ -1978,12 +2022,12 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1978
2022
|
id: e.id,
|
|
1979
2023
|
"aria-live": "polite",
|
|
1980
2024
|
class: "sr-only"
|
|
1981
|
-
}, j(e.text), 9,
|
|
2025
|
+
}, j(e.text), 9, qi)], 64));
|
|
1982
2026
|
}
|
|
1983
|
-
}),
|
|
2027
|
+
}), Yi = { class: "flex items-center gap-1" }, Xi = ["hidden"], Zi = {
|
|
1984
2028
|
key: 0,
|
|
1985
2029
|
class: "col-start-2 row-start-1 flex h-5 items-center text-xs"
|
|
1986
|
-
},
|
|
2030
|
+
}, Qi = "input, textarea, [role=\"spinbutton\"], [contenteditable=\"true\"]", $i = /* @__PURE__ */ f({
|
|
1987
2031
|
__name: "FormField",
|
|
1988
2032
|
props: {
|
|
1989
2033
|
label: {},
|
|
@@ -2006,7 +2050,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2006
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);
|
|
2007
2051
|
function _(e) {
|
|
2008
2052
|
let t = e.target;
|
|
2009
|
-
n.disabled || t.closest(`${
|
|
2053
|
+
n.disabled || t.closest(`${Qi}, button`) || (e.preventDefault(), e.currentTarget.querySelector(Qi)?.focus());
|
|
2010
2054
|
}
|
|
2011
2055
|
function v() {
|
|
2012
2056
|
let e = document.getElementById(l);
|
|
@@ -2024,12 +2068,12 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2024
2068
|
loading: ""
|
|
2025
2069
|
};
|
|
2026
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")) }, [
|
|
2027
|
-
c("div", { class: y(M(X)("col-start-1 row-start-1 flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div",
|
|
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", {
|
|
2028
2072
|
id: u,
|
|
2029
2073
|
for: l,
|
|
2030
2074
|
class: "text-sm",
|
|
2031
2075
|
onClick: v
|
|
2032
|
-
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(
|
|
2076
|
+
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(Gi, {
|
|
2033
2077
|
key: 0,
|
|
2034
2078
|
text: e.helper,
|
|
2035
2079
|
label: M(t)("ui.formField.about", { label: e.label })
|
|
@@ -2038,7 +2082,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2038
2082
|
id: f,
|
|
2039
2083
|
hidden: e.helperPlacement === "icon",
|
|
2040
2084
|
class: "text-xs text-black/65"
|
|
2041
|
-
}, j(e.helper), 9,
|
|
2085
|
+
}, j(e.helper), 9, Xi)) : o("", !0)], 2),
|
|
2042
2086
|
c("div", {
|
|
2043
2087
|
class: y(M(X)(b, "col-span-2 row-start-2", m.value && x[m.value], e.disabled && "opacity-40 cursor-not-allowed")),
|
|
2044
2088
|
onPointerdown: _
|
|
@@ -2052,19 +2096,19 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2052
2096
|
}),
|
|
2053
2097
|
O(r.$slots, "trailing")
|
|
2054
2098
|
], 34),
|
|
2055
|
-
r.$slots["label-trailing"] ? (w(), s("div",
|
|
2056
|
-
], 2), d(
|
|
2099
|
+
r.$slots["label-trailing"] ? (w(), s("div", Zi, [O(r.$slots, "label-trailing")])) : o("", !0)
|
|
2100
|
+
], 2), d(Ji, {
|
|
2057
2101
|
id: p,
|
|
2058
2102
|
status: m.value,
|
|
2059
2103
|
text: h.value
|
|
2060
2104
|
}, null, 8, ["status", "text"])], 2));
|
|
2061
2105
|
}
|
|
2062
|
-
}),
|
|
2106
|
+
}), ea = [
|
|
2063
2107
|
"id",
|
|
2064
2108
|
"disabled",
|
|
2065
2109
|
"aria-invalid",
|
|
2066
2110
|
"aria-describedby"
|
|
2067
|
-
],
|
|
2111
|
+
], ta = /* @__PURE__ */ f({
|
|
2068
2112
|
inheritAttrs: !1,
|
|
2069
2113
|
__name: "Input",
|
|
2070
2114
|
props: /*@__PURE__*/ g({
|
|
@@ -2096,7 +2140,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2096
2140
|
if (n.maxLength !== void 0 && e > n.maxLength) return t("ui.input.maxLength", { count: n.maxLength });
|
|
2097
2141
|
if (o.value && n.minLength !== void 0 && e > 0 && e < n.minLength) return t("ui.input.minLength", { count: n.minLength });
|
|
2098
2142
|
}), u = i(() => n.status ?? (s.value ? "error" : void 0)), d = i(() => n.statusText ?? s.value);
|
|
2099
|
-
return (t, i) => (w(), a(
|
|
2143
|
+
return (t, i) => (w(), a($i, {
|
|
2100
2144
|
label: e.label,
|
|
2101
2145
|
helper: e.helper,
|
|
2102
2146
|
"helper-placement": e.helperPlacement,
|
|
@@ -2116,7 +2160,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2116
2160
|
"aria-describedby": a,
|
|
2117
2161
|
class: "h-5 min-w-0 flex-1 bg-transparent outline-none placeholder:text-black/55 disabled:cursor-not-allowed",
|
|
2118
2162
|
onBlur: i[1] ||= (e) => o.value = !0
|
|
2119
|
-
}), null, 16,
|
|
2163
|
+
}), null, 16, ea), [[L, r.value]])]),
|
|
2120
2164
|
_: 2
|
|
2121
2165
|
}, [t.$slots.leading ? {
|
|
2122
2166
|
name: "leading",
|
|
@@ -2138,7 +2182,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2138
2182
|
"class"
|
|
2139
2183
|
]));
|
|
2140
2184
|
}
|
|
2141
|
-
}),
|
|
2185
|
+
}), na = "-ml-3 rounded-l border-r border-black/15", ra = "-mr-3 rounded-r border-l border-black/15", ia = /* @__PURE__ */ f({
|
|
2142
2186
|
inheritAttrs: !1,
|
|
2143
2187
|
__name: "InputNumber",
|
|
2144
2188
|
props: /*@__PURE__*/ g({
|
|
@@ -2173,7 +2217,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2173
2217
|
"not-disabled:hover:brightness-90 not-disabled:active:brightness-80 [&_svg]:opacity-100!",
|
|
2174
2218
|
"disabled:cursor-not-allowed disabled:[&_svg]:opacity-40!"
|
|
2175
2219
|
];
|
|
2176
|
-
return (t, i) => (w(), a(
|
|
2220
|
+
return (t, i) => (w(), a($i, {
|
|
2177
2221
|
label: e.label,
|
|
2178
2222
|
helper: e.helper,
|
|
2179
2223
|
"helper-placement": e.helperPlacement,
|
|
@@ -2197,7 +2241,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2197
2241
|
class: "contents"
|
|
2198
2242
|
}, {
|
|
2199
2243
|
default: V(() => [
|
|
2200
|
-
d(M(Ct), { class: y([o,
|
|
2244
|
+
d(M(Ct), { class: y([o, na]) }, {
|
|
2201
2245
|
default: V(() => [d(M(De))]),
|
|
2202
2246
|
_: 1
|
|
2203
2247
|
}, 8, ["class"]),
|
|
@@ -2211,7 +2255,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2211
2255
|
"aria-describedby",
|
|
2212
2256
|
"aria-valuetext"
|
|
2213
2257
|
]),
|
|
2214
|
-
d(M(wt), { class: y([o,
|
|
2258
|
+
d(M(wt), { class: y([o, ra]) }, {
|
|
2215
2259
|
default: V(() => [d(M(Ae))]),
|
|
2216
2260
|
_: 1
|
|
2217
2261
|
}, 8, ["class"])
|
|
@@ -2240,26 +2284,26 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2240
2284
|
"class"
|
|
2241
2285
|
]));
|
|
2242
2286
|
}
|
|
2243
|
-
}),
|
|
2287
|
+
}), aa = { class: "flex items-center" }, oa = ["aria-label", "disabled"], sa = ["aria-label", "disabled"], ca = {
|
|
2244
2288
|
key: 2,
|
|
2245
2289
|
class: "px-1.5 py-1 text-sm tabular-nums"
|
|
2246
|
-
},
|
|
2290
|
+
}, la = {
|
|
2247
2291
|
key: 0,
|
|
2248
2292
|
class: "mt-3 grid w-56 grid-cols-3 gap-1"
|
|
2249
|
-
},
|
|
2293
|
+
}, ua = [
|
|
2250
2294
|
"aria-current",
|
|
2251
2295
|
"aria-pressed",
|
|
2252
2296
|
"disabled",
|
|
2253
2297
|
"onClick"
|
|
2254
|
-
],
|
|
2298
|
+
], da = {
|
|
2255
2299
|
key: 1,
|
|
2256
2300
|
class: "mt-3 grid w-56 grid-cols-3 gap-1"
|
|
2257
|
-
},
|
|
2301
|
+
}, fa = [
|
|
2258
2302
|
"aria-current",
|
|
2259
2303
|
"aria-pressed",
|
|
2260
2304
|
"disabled",
|
|
2261
2305
|
"onClick"
|
|
2262
|
-
],
|
|
2306
|
+
], pa = /* @__PURE__ */ f({
|
|
2263
2307
|
__name: "Calendar",
|
|
2264
2308
|
props: /*@__PURE__*/ g({
|
|
2265
2309
|
min: {},
|
|
@@ -2334,25 +2378,25 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2334
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) => {
|
|
2335
2379
|
let t = Cn(vn());
|
|
2336
2380
|
return v.value.year === t.year && e === t.month;
|
|
2337
|
-
},
|
|
2381
|
+
}, q = (e) => e === Cn(vn()).year, J = [
|
|
2338
2382
|
"inline-flex items-center gap-0.5 rounded px-1.5 py-1 text-sm cursor-pointer transition",
|
|
2339
2383
|
"hover:bg-black/10 active:bg-black/15 [&_svg]:size-3.5",
|
|
2340
2384
|
"disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
2341
2385
|
"outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus"
|
|
2342
|
-
],
|
|
2386
|
+
], te = [
|
|
2343
2387
|
"relative aria-[current=date]:font-bold",
|
|
2344
2388
|
"aria-[current=date]:after:absolute aria-[current=date]:after:left-1/2 aria-[current=date]:after:size-1",
|
|
2345
2389
|
"aria-[current=date]:after:-translate-x-1/2 aria-[current=date]:after:rounded-full aria-[current=date]:after:bg-current"
|
|
2346
|
-
],
|
|
2347
|
-
...
|
|
2390
|
+
], ne = [
|
|
2391
|
+
...te,
|
|
2348
2392
|
"aria-[current=date]:after:bottom-2",
|
|
2349
2393
|
"flex h-12 items-center justify-center rounded text-sm tabular-nums cursor-pointer transition",
|
|
2350
2394
|
"hover:bg-black/10",
|
|
2351
2395
|
"aria-pressed:bg-primary aria-pressed:text-white aria-pressed:hover:bg-primary",
|
|
2352
2396
|
"disabled:cursor-not-allowed disabled:text-black/25 disabled:hover:bg-transparent",
|
|
2353
2397
|
"outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus"
|
|
2354
|
-
],
|
|
2355
|
-
...
|
|
2398
|
+
], re = [
|
|
2399
|
+
...te,
|
|
2356
2400
|
"aria-[current=date]:after:bottom-0.5",
|
|
2357
2401
|
"flex size-8 items-center justify-center rounded text-sm tabular-nums cursor-pointer transition",
|
|
2358
2402
|
"hover:bg-black/10",
|
|
@@ -2405,21 +2449,21 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2405
2449
|
default: V(() => [d(M(de))]),
|
|
2406
2450
|
_: 1
|
|
2407
2451
|
}, 8, ["aria-label", "disabled"])),
|
|
2408
|
-
c("div",
|
|
2452
|
+
c("div", aa, [_.value === "days" ? (w(), s("button", {
|
|
2409
2453
|
key: 0,
|
|
2410
2454
|
type: "button",
|
|
2411
|
-
class: y(
|
|
2455
|
+
class: y(J),
|
|
2412
2456
|
"aria-label": M(t)("ui.calendar.chooseMonth"),
|
|
2413
2457
|
disabled: e.disabled,
|
|
2414
2458
|
onClick: k
|
|
2415
|
-
}, [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", {
|
|
2416
2460
|
key: 1,
|
|
2417
2461
|
type: "button",
|
|
2418
|
-
class: y(
|
|
2462
|
+
class: y(J),
|
|
2419
2463
|
"aria-label": M(t)("ui.calendar.chooseYear"),
|
|
2420
2464
|
disabled: e.disabled,
|
|
2421
2465
|
onClick: N
|
|
2422
|
-
}, [u(j(v.value.year) + " ", 1), d(M(ue))], 8,
|
|
2466
|
+
}, [u(j(v.value.year) + " ", 1), d(M(ue))], 8, sa))]),
|
|
2423
2467
|
_.value === "days" ? (w(), a(M(Ue), {
|
|
2424
2468
|
key: 2,
|
|
2425
2469
|
"as-child": ""
|
|
@@ -2449,23 +2493,23 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2449
2493
|
]),
|
|
2450
2494
|
_: 1
|
|
2451
2495
|
}),
|
|
2452
|
-
_.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", {
|
|
2453
2497
|
key: e,
|
|
2454
2498
|
type: "button",
|
|
2455
|
-
class: y(
|
|
2499
|
+
class: y(ne),
|
|
2456
2500
|
"aria-current": G(t + 1) ? "date" : void 0,
|
|
2457
2501
|
"aria-pressed": ee(t + 1),
|
|
2458
2502
|
disabled: R(t + 1),
|
|
2459
2503
|
onClick: (e) => P(t + 1)
|
|
2460
|
-
}, 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", {
|
|
2461
2505
|
key: e,
|
|
2462
2506
|
type: "button",
|
|
2463
|
-
class: y(
|
|
2464
|
-
"aria-current":
|
|
2507
|
+
class: y(ne),
|
|
2508
|
+
"aria-current": q(e) ? "date" : void 0,
|
|
2465
2509
|
"aria-pressed": W(e),
|
|
2466
2510
|
disabled: B(e),
|
|
2467
2511
|
onClick: (t) => I(e)
|
|
2468
|
-
}, j(e), 9,
|
|
2512
|
+
}, j(e), 9, fa))), 128))])) : o("", !0),
|
|
2469
2513
|
(w(!0), s(n, null, D(_.value === "days" ? i : [], (e) => (w(), a(M(Le), {
|
|
2470
2514
|
key: e.value.toString(),
|
|
2471
2515
|
class: "mt-3 border-collapse select-none"
|
|
@@ -2495,7 +2539,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2495
2539
|
day: t,
|
|
2496
2540
|
month: e.value,
|
|
2497
2541
|
"aria-current": M(yn)(t, M(vn)()) ? "date" : void 0,
|
|
2498
|
-
class: y(
|
|
2542
|
+
class: y(re)
|
|
2499
2543
|
}, null, 8, [
|
|
2500
2544
|
"day",
|
|
2501
2545
|
"month",
|
|
@@ -2522,7 +2566,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2522
2566
|
"class"
|
|
2523
2567
|
]));
|
|
2524
2568
|
}
|
|
2525
|
-
}),
|
|
2569
|
+
}), ma = {
|
|
2526
2570
|
monday: 1,
|
|
2527
2571
|
mon: 1,
|
|
2528
2572
|
tuesday: 2,
|
|
@@ -2541,7 +2585,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2541
2585
|
sat: 6,
|
|
2542
2586
|
sunday: 7,
|
|
2543
2587
|
sun: 7
|
|
2544
|
-
}, Q = `(${Object.keys(
|
|
2588
|
+
}, Q = `(${Object.keys(ma).join("|")})`, ha = {
|
|
2545
2589
|
january: 1,
|
|
2546
2590
|
jan: 1,
|
|
2547
2591
|
february: 2,
|
|
@@ -2566,7 +2610,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2566
2610
|
nov: 11,
|
|
2567
2611
|
december: 12,
|
|
2568
2612
|
dec: 12
|
|
2569
|
-
},
|
|
2613
|
+
}, ga = `(${Object.keys(ha).sort((e, t) => t.length - e.length).join("|")})`, _a = {
|
|
2570
2614
|
a: 1,
|
|
2571
2615
|
an: 1,
|
|
2572
2616
|
one: 1,
|
|
@@ -2590,7 +2634,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2590
2634
|
nineteen: 19,
|
|
2591
2635
|
twenty: 20,
|
|
2592
2636
|
thirty: 30
|
|
2593
|
-
},
|
|
2637
|
+
}, va = `(\\d+|${Object.keys(_a).join("|")})`, ya = "(day|week|fortnight|month|year)s?", ba = {
|
|
2594
2638
|
first: 1,
|
|
2595
2639
|
second: 2,
|
|
2596
2640
|
third: 3,
|
|
@@ -2612,37 +2656,37 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2612
2656
|
nineteenth: 19,
|
|
2613
2657
|
twentieth: 20,
|
|
2614
2658
|
thirtieth: 30
|
|
2615
|
-
},
|
|
2616
|
-
function
|
|
2659
|
+
}, xa = Object.keys(ba).join("|");
|
|
2660
|
+
function Sa(e) {
|
|
2617
2661
|
return new Date(e.year, e.month - 1, e.day).getDay() || 7;
|
|
2618
2662
|
}
|
|
2619
|
-
function
|
|
2620
|
-
return e.subtract({ days:
|
|
2663
|
+
function Ca(e) {
|
|
2664
|
+
return e.subtract({ days: Sa(e) - 1 });
|
|
2621
2665
|
}
|
|
2622
2666
|
function $(e, t, n) {
|
|
2623
2667
|
if (!Number.isInteger(e) || t < 1 || t > 12 || n < 1) return;
|
|
2624
2668
|
let r = new gn(e, t, 1);
|
|
2625
2669
|
if (!(n > r.calendar.getDaysInMonth(r))) return new gn(e, t, n);
|
|
2626
2670
|
}
|
|
2627
|
-
function
|
|
2671
|
+
function wa(e, t, n, r) {
|
|
2628
2672
|
if (r === -1) {
|
|
2629
2673
|
let r = _n(new gn(e, t, 1));
|
|
2630
|
-
return r.subtract({ days: (
|
|
2674
|
+
return r.subtract({ days: (Sa(r) - n + 7) % 7 });
|
|
2631
2675
|
}
|
|
2632
|
-
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 });
|
|
2633
2677
|
return a.month === t ? a : void 0;
|
|
2634
2678
|
}
|
|
2635
|
-
function
|
|
2679
|
+
function Ta(e) {
|
|
2636
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;
|
|
2637
2681
|
return new gn(e, p, m);
|
|
2638
2682
|
}
|
|
2639
|
-
function
|
|
2683
|
+
function Ea(e, t) {
|
|
2640
2684
|
if (e.length === 4) return Number(e);
|
|
2641
2685
|
if (e.length !== 2) return NaN;
|
|
2642
2686
|
let n = Number(e);
|
|
2643
2687
|
return n <= t.year % 100 ? 2e3 + n : 1900 + n;
|
|
2644
2688
|
}
|
|
2645
|
-
var
|
|
2689
|
+
var Da = [
|
|
2646
2690
|
["(?:christmas|xmas) eve", (e) => $(e, 12, 24)],
|
|
2647
2691
|
["(?:christmas|xmas)(?: day)?", (e) => $(e, 12, 25)],
|
|
2648
2692
|
["boxing day", (e) => $(e, 12, 26)],
|
|
@@ -2650,16 +2694,16 @@ var xa = [
|
|
|
2650
2694
|
["new years?(?: day)?", (e) => $(e, 1, 1)],
|
|
2651
2695
|
["valentines(?: day)?", (e) => $(e, 2, 14)],
|
|
2652
2696
|
["(?:st )?(?:patricks|paddys) day", (e) => $(e, 3, 17)],
|
|
2653
|
-
["good friday", (e) =>
|
|
2654
|
-
["easter monday", (e) =>
|
|
2655
|
-
["easter(?: sunday| day)?", (e) =>
|
|
2656
|
-
["(?:mothers day|mothering sunday)", (e) =>
|
|
2657
|
-
["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)],
|
|
2658
2702
|
["halloween", (e) => $(e, 10, 31)],
|
|
2659
2703
|
["(?:bonfire night|guy fawkes(?: night| day)?)", (e) => $(e, 11, 5)],
|
|
2660
2704
|
["(?:remembrance|armistice) day", (e) => $(e, 11, 11)]
|
|
2661
2705
|
];
|
|
2662
|
-
function
|
|
2706
|
+
function Oa(e, t, n) {
|
|
2663
2707
|
let r = e.filter((e) => !!e).sort((e, t) => e.compare(t));
|
|
2664
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) => {
|
|
2665
2709
|
if (!e) return n;
|
|
@@ -2667,14 +2711,14 @@ function Sa(e, t, n) {
|
|
|
2667
2711
|
return r < i || r === i && n.compare(t) > 0 ? n : e;
|
|
2668
2712
|
}, void 0);
|
|
2669
2713
|
}
|
|
2670
|
-
function
|
|
2714
|
+
function ka(e, t, n, r, i) {
|
|
2671
2715
|
if (!e) return n.yearValue === void 0 ? r.add(t) : void 0;
|
|
2672
2716
|
switch (e.kind) {
|
|
2673
2717
|
case "date": return n.yearValue === void 0 ? e.date.add(t) : void 0;
|
|
2674
2718
|
case "yearless": return n.yearValue === void 0 ? n.year || t.years ? e.resolve(r.year + t.years)?.add({
|
|
2675
2719
|
...t,
|
|
2676
2720
|
years: 0
|
|
2677
|
-
}) :
|
|
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({
|
|
2678
2722
|
...t,
|
|
2679
2723
|
years: 0
|
|
2680
2724
|
});
|
|
@@ -2687,19 +2731,19 @@ function Ca(e, t, n, r, i) {
|
|
|
2687
2731
|
months: 0
|
|
2688
2732
|
});
|
|
2689
2733
|
}
|
|
2690
|
-
return
|
|
2734
|
+
return Oa([
|
|
2691
2735
|
-1,
|
|
2692
2736
|
0,
|
|
2693
2737
|
1
|
|
2694
2738
|
].map((e) => xn(r).add({ months: e })).map((t) => $(t.year, t.month, e.day)), r, i)?.add(t);
|
|
2695
2739
|
case "weekday": {
|
|
2696
2740
|
if (n.yearValue !== void 0) return;
|
|
2697
|
-
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 });
|
|
2698
2742
|
return (i === "past" || i === "nearest" && o < a ? c : s).add(t);
|
|
2699
2743
|
}
|
|
2700
2744
|
}
|
|
2701
2745
|
}
|
|
2702
|
-
function
|
|
2746
|
+
function Aa(e, t, n) {
|
|
2703
2747
|
let r = e.trim(), i = /^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(r);
|
|
2704
2748
|
if (i) {
|
|
2705
2749
|
let e = $(Number(i[1]), Number(i[2]), Number(i[3]));
|
|
@@ -2725,29 +2769,29 @@ function wa(e, t, n) {
|
|
|
2725
2769
|
kind: "yearless",
|
|
2726
2770
|
resolve: (e) => $(e, o, i)
|
|
2727
2771
|
};
|
|
2728
|
-
let s = $(
|
|
2772
|
+
let s = $(Ea(r.year, t), o, i);
|
|
2729
2773
|
return s && {
|
|
2730
2774
|
kind: "date",
|
|
2731
2775
|
date: s
|
|
2732
2776
|
};
|
|
2733
2777
|
}
|
|
2734
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) => {
|
|
2735
|
-
let i = Number(e), a =
|
|
2779
|
+
let i = Number(e), a = ha[n];
|
|
2736
2780
|
if (r === void 0) return {
|
|
2737
2781
|
kind: "yearless",
|
|
2738
2782
|
resolve: (e) => $(e, a, i)
|
|
2739
2783
|
};
|
|
2740
|
-
let o = $(
|
|
2784
|
+
let o = $(Ea(r, t), a, i);
|
|
2741
2785
|
return o && {
|
|
2742
2786
|
kind: "date",
|
|
2743
2787
|
date: o
|
|
2744
2788
|
};
|
|
2745
2789
|
}, c;
|
|
2746
|
-
if (c = RegExp(`^(\\d{1,2}) ${
|
|
2747
|
-
if (c = RegExp(`^${
|
|
2748
|
-
if (c = RegExp(`^(\\d{4}) ${
|
|
2749
|
-
if (c = RegExp(`^${
|
|
2750
|
-
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]];
|
|
2751
2795
|
if (c[2]) {
|
|
2752
2796
|
let t = $(Number(c[2]), e, 1);
|
|
2753
2797
|
return t && {
|
|
@@ -2768,22 +2812,22 @@ function wa(e, t, n) {
|
|
|
2768
2812
|
} : void 0;
|
|
2769
2813
|
}
|
|
2770
2814
|
}
|
|
2771
|
-
function
|
|
2815
|
+
function ja(e) {
|
|
2772
2816
|
return `${e}${e % 100 >= 11 && e % 100 <= 13 ? "th" : {
|
|
2773
2817
|
1: "st",
|
|
2774
2818
|
2: "nd",
|
|
2775
2819
|
3: "rd"
|
|
2776
2820
|
}[e % 10] ?? "th"}`;
|
|
2777
2821
|
}
|
|
2778
|
-
function
|
|
2779
|
-
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();
|
|
2780
2824
|
}
|
|
2781
|
-
function
|
|
2825
|
+
function Na(e, t) {
|
|
2782
2826
|
let { today: n, order: r = [
|
|
2783
2827
|
"day",
|
|
2784
2828
|
"month",
|
|
2785
2829
|
"year"
|
|
2786
|
-
], prefer: i = "future" } = t, a =
|
|
2830
|
+
], prefer: i = "future" } = t, a = Ma(e);
|
|
2787
2831
|
if (!a) return;
|
|
2788
2832
|
let o = ` ${a} `, s = !1, c = !1, l = [], u = !1, d = {
|
|
2789
2833
|
days: 0,
|
|
@@ -2793,7 +2837,7 @@ function Da(e, t) {
|
|
|
2793
2837
|
}, f = {
|
|
2794
2838
|
year: !1,
|
|
2795
2839
|
month: !1
|
|
2796
|
-
}, p =
|
|
2840
|
+
}, p = Ca(n);
|
|
2797
2841
|
function m(e) {
|
|
2798
2842
|
let t = RegExp(` ${e} `).exec(o);
|
|
2799
2843
|
return t && (o = o.replace(t[0], " "), s = !0), t;
|
|
@@ -2803,18 +2847,18 @@ function Da(e, t) {
|
|
|
2803
2847
|
}, g = (e) => e && {
|
|
2804
2848
|
kind: "date",
|
|
2805
2849
|
date: e
|
|
2806
|
-
}, _ = (e, t = 1) => e.slice(t).find((e) => e !== void 0), v = (e) => e === "fortnight" ? ["weeks", 2] : [`${e}s`, 1], y = (e) =>
|
|
2807
|
-
if (m("eow") && h(g(p.add({ days: 4 }))), m("eom") && h(g(_n(n))), m("eoy") && h(g(new gn(n.year, 12, 31))), x = m(`(1st|2nd|3rd|4th|5th|last) ${Q} (?:of|in) (?:(this|next|last) month|month|${
|
|
2808
|
-
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]];
|
|
2809
2853
|
if (x[4]) {
|
|
2810
|
-
let n =
|
|
2811
|
-
x[5] ? h(g(
|
|
2854
|
+
let n = ha[x[4]];
|
|
2855
|
+
x[5] ? h(g(wa(Number(x[5]), n, t, e))) : h({
|
|
2812
2856
|
kind: "yearless",
|
|
2813
|
-
resolve: (r) =>
|
|
2857
|
+
resolve: (r) => wa(r, n, t, e)
|
|
2814
2858
|
});
|
|
2815
2859
|
} else {
|
|
2816
2860
|
let r = x[3] === "next" ? 1 : x[3] === "last" ? -1 : 0, i = xn(n).add({ months: r });
|
|
2817
|
-
h(g(
|
|
2861
|
+
h(g(wa(i.year, i.month, t, e)));
|
|
2818
2862
|
}
|
|
2819
2863
|
}
|
|
2820
2864
|
if (x = m("(start|beginning|middle|mid|end) (?:of )?(?:(this|next|last) )?(week|month|year)")) {
|
|
@@ -2828,8 +2872,8 @@ function Da(e, t) {
|
|
|
2828
2872
|
h(g(t === "start" ? new gn(r, 1, 1) : t === "mid" ? new gn(r, 7, 1) : new gn(r, 12, 31)));
|
|
2829
2873
|
}
|
|
2830
2874
|
}
|
|
2831
|
-
if (x = m(`(start|beginning|early|middle|mid|late|end) (?:of )?${
|
|
2832
|
-
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) => [
|
|
2833
2877
|
"start",
|
|
2834
2878
|
"beginning",
|
|
2835
2879
|
"early"
|
|
@@ -2846,38 +2890,38 @@ function Da(e, t) {
|
|
|
2846
2890
|
kind: "weekday",
|
|
2847
2891
|
weekday: 6
|
|
2848
2892
|
});
|
|
2849
|
-
for (let [e, t] of
|
|
2893
|
+
for (let [e, t] of Da) m(e) && h({
|
|
2850
2894
|
kind: "yearless",
|
|
2851
2895
|
resolve: t
|
|
2852
2896
|
});
|
|
2853
|
-
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}`)) {
|
|
2854
2898
|
let [e, t] = v(x[2]);
|
|
2855
|
-
h(g(b(
|
|
2899
|
+
h(g(b(ma[x[3]]).add({ [e]: y(x[1]) * t })));
|
|
2856
2900
|
}
|
|
2857
|
-
if (x = m(`${
|
|
2901
|
+
if (x = m(`${va} ${ya} (today|tomorrow|tmrw|tmr)`)) {
|
|
2858
2902
|
let [e, t] = v(x[2]);
|
|
2859
2903
|
h(g((x[3] === "today" ? n : n.add({ days: 1 })).add({ [e]: y(x[1]) * t })));
|
|
2860
2904
|
}
|
|
2861
2905
|
for ((x = m(`(?:next week ${Q}|${Q} next week|next ${Q})`)) && h(g(p.add({
|
|
2862
2906
|
weeks: 1,
|
|
2863
|
-
days:
|
|
2864
|
-
}))), (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({
|
|
2865
2909
|
kind: "weekday",
|
|
2866
|
-
weekday:
|
|
2867
|
-
}, !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}`);) {
|
|
2868
2912
|
let [e, t] = v(x[2]);
|
|
2869
2913
|
d[e] += (x[1] === "next" ? 1 : -1) * t;
|
|
2870
2914
|
}
|
|
2871
2915
|
let S = !1;
|
|
2872
|
-
for (; x = m(`in ${
|
|
2916
|
+
for (; x = m(`in ${va} ${ya}`);) {
|
|
2873
2917
|
let [e, t] = v(x[2]);
|
|
2874
2918
|
d[e] += y(x[1]) * t, S = !0;
|
|
2875
2919
|
}
|
|
2876
|
-
for (; S && (x = m(`(?:and )?${
|
|
2920
|
+
for (; S && (x = m(`(?:and )?${va} ${ya}(?! (?:ago|before|earlier|from|after|later))`));) {
|
|
2877
2921
|
let [e, t] = v(x[2]);
|
|
2878
2922
|
d[e] += y(x[1]) * t;
|
|
2879
2923
|
}
|
|
2880
|
-
for (; x = m(`${
|
|
2924
|
+
for (; x = m(`${va} ${ya} (ago|before|earlier|from|after|later)`);) {
|
|
2881
2925
|
let [e, t] = v(x[2]), n = [
|
|
2882
2926
|
"ago",
|
|
2883
2927
|
"before",
|
|
@@ -2888,24 +2932,24 @@ function Da(e, t) {
|
|
|
2888
2932
|
for (; m("(?:on|of|at|by|for)"););
|
|
2889
2933
|
let C = o.trim();
|
|
2890
2934
|
if (s && /^\d{4}$/.test(C) && (f.yearValue = Number(C), C = ""), C) {
|
|
2891
|
-
let e =
|
|
2935
|
+
let e = Aa(C, n, r);
|
|
2892
2936
|
if (!e) return;
|
|
2893
2937
|
l.length === 1 && u && l.pop(), l.push(e);
|
|
2894
2938
|
} else if (!s) return;
|
|
2895
|
-
if (!(c || l.length > 1)) return
|
|
2939
|
+
if (!(c || l.length > 1)) return ka(l[0], d, f, n, i);
|
|
2896
2940
|
}
|
|
2897
2941
|
// src/components/InputDate/InputDate.vue?vue&type=script&setup=true&lang.ts
|
|
2898
|
-
var
|
|
2942
|
+
var Pa = [
|
|
2899
2943
|
"id",
|
|
2900
2944
|
"placeholder",
|
|
2901
2945
|
"disabled",
|
|
2902
2946
|
"aria-invalid",
|
|
2903
2947
|
"aria-describedby"
|
|
2904
|
-
],
|
|
2948
|
+
], Fa = {
|
|
2905
2949
|
key: 0,
|
|
2906
2950
|
"aria-hidden": "true",
|
|
2907
2951
|
class: "shrink-0 tabular-nums text-black/55"
|
|
2908
|
-
},
|
|
2952
|
+
}, Ia = /* @__PURE__ */ f({
|
|
2909
2953
|
inheritAttrs: !1,
|
|
2910
2954
|
__name: "InputDate",
|
|
2911
2955
|
props: /*@__PURE__*/ g({
|
|
@@ -2964,7 +3008,7 @@ var Oa = [
|
|
|
2964
3008
|
return g.value.format(new Date(e.year, e.month - 1, e.day));
|
|
2965
3009
|
}
|
|
2966
3010
|
function D(e) {
|
|
2967
|
-
return
|
|
3011
|
+
return Na(e, {
|
|
2968
3012
|
today: Cn(vn()),
|
|
2969
3013
|
order: b.value,
|
|
2970
3014
|
prefer: n.prefer
|
|
@@ -2999,17 +3043,17 @@ var Oa = [
|
|
|
2999
3043
|
t && O.value === T(t) || (e.preventDefault(), I());
|
|
3000
3044
|
}
|
|
3001
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);
|
|
3002
|
-
function
|
|
3046
|
+
function q(e) {
|
|
3003
3047
|
r.value = e, G.value = !1;
|
|
3004
3048
|
}
|
|
3005
|
-
let
|
|
3049
|
+
let J = [
|
|
3006
3050
|
"flex w-9 shrink-0 -my-2 -mr-3 self-stretch items-center justify-center",
|
|
3007
3051
|
"rounded-r border-l border-black/15 bg-white cursor-pointer transition",
|
|
3008
3052
|
"not-disabled:hover:brightness-90 not-disabled:active:brightness-80 [&_svg]:opacity-100!",
|
|
3009
3053
|
"data-[state=open]:brightness-90 disabled:cursor-not-allowed",
|
|
3010
3054
|
"outline-2 -outline-offset-2 outline-transparent focus-visible:outline-focus"
|
|
3011
3055
|
];
|
|
3012
|
-
return (i, l) => (w(), a(
|
|
3056
|
+
return (i, l) => (w(), a($i, {
|
|
3013
3057
|
label: e.label,
|
|
3014
3058
|
helper: e.helper,
|
|
3015
3059
|
"helper-placement": e.helperPlacement,
|
|
@@ -3040,11 +3084,11 @@ var Oa = [
|
|
|
3040
3084
|
onInput: P,
|
|
3041
3085
|
onBlur: I,
|
|
3042
3086
|
onKeydown: U(L, ["enter"])
|
|
3043
|
-
}), null, 16,
|
|
3044
|
-
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),
|
|
3045
3089
|
d(M(lt), {
|
|
3046
3090
|
"aria-label": M(t)("ui.inputDate.openCalendar"),
|
|
3047
|
-
class: y(
|
|
3091
|
+
class: y(J)
|
|
3048
3092
|
}, {
|
|
3049
3093
|
default: V(() => [d(M(ce))]),
|
|
3050
3094
|
_: 1
|
|
@@ -3054,12 +3098,12 @@ var Oa = [
|
|
|
3054
3098
|
align: "end",
|
|
3055
3099
|
class: y([M(Kn), "p-3"])
|
|
3056
3100
|
}, {
|
|
3057
|
-
default: V(() => [d(
|
|
3101
|
+
default: V(() => [d(pa, {
|
|
3058
3102
|
"model-value": r.value,
|
|
3059
3103
|
min: e.min,
|
|
3060
3104
|
max: e.max,
|
|
3061
3105
|
locale: e.locale,
|
|
3062
|
-
"onUpdate:modelValue":
|
|
3106
|
+
"onUpdate:modelValue": q
|
|
3063
3107
|
}, null, 8, [
|
|
3064
3108
|
"model-value",
|
|
3065
3109
|
"min",
|
|
@@ -3084,7 +3128,7 @@ var Oa = [
|
|
|
3084
3128
|
"class"
|
|
3085
3129
|
]));
|
|
3086
3130
|
}
|
|
3087
|
-
}),
|
|
3131
|
+
}), La = /* @__PURE__ */ f({
|
|
3088
3132
|
__name: "Tooltip",
|
|
3089
3133
|
props: {
|
|
3090
3134
|
text: {},
|
|
@@ -3135,7 +3179,7 @@ var Oa = [
|
|
|
3135
3179
|
_: 3
|
|
3136
3180
|
}));
|
|
3137
3181
|
}
|
|
3138
|
-
}),
|
|
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({
|
|
3139
3183
|
__name: "InputRichText",
|
|
3140
3184
|
props: /*@__PURE__*/ g({
|
|
3141
3185
|
label: {},
|
|
@@ -3242,7 +3286,7 @@ var Oa = [
|
|
|
3242
3286
|
toggle: () => l.value?.chain().focus().toggleUnderline().run()
|
|
3243
3287
|
}
|
|
3244
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)]";
|
|
3245
|
-
return (i, o) => (w(), a(
|
|
3289
|
+
return (i, o) => (w(), a($i, {
|
|
3246
3290
|
label: e.label,
|
|
3247
3291
|
helper: e.helper,
|
|
3248
3292
|
"helper-placement": e.helperPlacement,
|
|
@@ -3253,14 +3297,14 @@ var Oa = [
|
|
|
3253
3297
|
disabled: e.disabled,
|
|
3254
3298
|
class: y(r.class)
|
|
3255
3299
|
}, {
|
|
3256
|
-
default: V((r) => [c("div",
|
|
3300
|
+
default: V((r) => [c("div", Ra, [
|
|
3257
3301
|
c("div", {
|
|
3258
3302
|
role: "toolbar",
|
|
3259
3303
|
"aria-label": M(t)("ui.inputRichText.formattingFor", { label: e.label }),
|
|
3260
3304
|
"aria-controls": r.id,
|
|
3261
3305
|
class: "flex items-center gap-0.5 border-b border-black/15 px-1.5 py-1 [&_svg]:opacity-100!",
|
|
3262
3306
|
onMousedown: o[0] ||= ee(() => {}, ["prevent"])
|
|
3263
|
-
}, [(w(), s(n, null, D(_, (t) => d(
|
|
3307
|
+
}, [(w(), s(n, null, D(_, (t) => d(La, {
|
|
3264
3308
|
key: t.name,
|
|
3265
3309
|
text: `${t.label} (${M(g)}${t.key})`,
|
|
3266
3310
|
disabled: e.disabled
|
|
@@ -3286,7 +3330,7 @@ var Oa = [
|
|
|
3286
3330
|
"onClick"
|
|
3287
3331
|
])]),
|
|
3288
3332
|
_: 2
|
|
3289
|
-
}, 1032, ["text", "disabled"])), 64))], 40,
|
|
3333
|
+
}, 1032, ["text", "disabled"])), 64))], 40, za),
|
|
3290
3334
|
d(M(m), { ids: r }, null, 8, ["ids"]),
|
|
3291
3335
|
d(M(wn), {
|
|
3292
3336
|
editor: M(l),
|
|
@@ -3306,18 +3350,18 @@ var Oa = [
|
|
|
3306
3350
|
"class"
|
|
3307
3351
|
]));
|
|
3308
3352
|
}
|
|
3309
|
-
}),
|
|
3353
|
+
}), Va = [
|
|
3310
3354
|
"id",
|
|
3311
3355
|
"type",
|
|
3312
3356
|
"autocomplete",
|
|
3313
3357
|
"disabled",
|
|
3314
3358
|
"aria-invalid",
|
|
3315
3359
|
"aria-describedby"
|
|
3316
|
-
],
|
|
3360
|
+
], Ha = [
|
|
3317
3361
|
"aria-controls",
|
|
3318
3362
|
"aria-pressed",
|
|
3319
3363
|
"disabled"
|
|
3320
|
-
],
|
|
3364
|
+
], Ua = { class: "sr-only" }, Wa = /* @__PURE__ */ f({
|
|
3321
3365
|
inheritAttrs: !1,
|
|
3322
3366
|
__name: "InputPassword",
|
|
3323
3367
|
props: /*@__PURE__*/ g({
|
|
@@ -3356,7 +3400,7 @@ var Oa = [
|
|
|
3356
3400
|
"not-disabled:hover:brightness-90 not-disabled:active:brightness-80 [&_svg]:opacity-100!",
|
|
3357
3401
|
"outline-none focus-visible:bg-black/5 disabled:cursor-not-allowed"
|
|
3358
3402
|
];
|
|
3359
|
-
return (i, o) => (w(), a(
|
|
3403
|
+
return (i, o) => (w(), a($i, {
|
|
3360
3404
|
label: e.label,
|
|
3361
3405
|
helper: e.helper,
|
|
3362
3406
|
"helper-placement": e.helperPlacement,
|
|
@@ -3385,7 +3429,7 @@ var Oa = [
|
|
|
3385
3429
|
onKeydown: h,
|
|
3386
3430
|
onKeyup: h,
|
|
3387
3431
|
onBlur: o[1] ||= (e) => m.value = !1
|
|
3388
|
-
}), null, 16,
|
|
3432
|
+
}), null, 16, Va), [[L, r.value]]), c("button", {
|
|
3389
3433
|
type: "button",
|
|
3390
3434
|
class: y(v),
|
|
3391
3435
|
"aria-controls": n,
|
|
@@ -3393,13 +3437,13 @@ var Oa = [
|
|
|
3393
3437
|
disabled: e.disabled,
|
|
3394
3438
|
onPointerdown: o[2] ||= ee(() => {}, ["prevent"]),
|
|
3395
3439
|
onClick: o[3] ||= (e) => d.value = !d.value
|
|
3396
|
-
}, [c("span",
|
|
3440
|
+
}, [c("span", Ua, j(M(t)("ui.inputPassword.show")), 1), d.value ? (w(), a(M(Y), {
|
|
3397
3441
|
key: 0,
|
|
3398
3442
|
"aria-hidden": "true"
|
|
3399
3443
|
})) : (w(), a(M(xe), {
|
|
3400
3444
|
key: 1,
|
|
3401
3445
|
"aria-hidden": "true"
|
|
3402
|
-
}))], 40,
|
|
3446
|
+
}))], 40, Ha)]),
|
|
3403
3447
|
_: 2
|
|
3404
3448
|
}, [i.$slots.leading ? {
|
|
3405
3449
|
name: "leading",
|
|
@@ -3421,7 +3465,7 @@ var Oa = [
|
|
|
3421
3465
|
"class"
|
|
3422
3466
|
]));
|
|
3423
3467
|
}
|
|
3424
|
-
}),
|
|
3468
|
+
}), Ga = { class: "flex flex-col gap-0.5" }, Ka = { class: "flex items-center gap-1" }, qa = ["for"], Ja = ["hidden"], Ya = /* @__PURE__ */ f({
|
|
3425
3469
|
__name: "InputCode",
|
|
3426
3470
|
props: /*@__PURE__*/ g({
|
|
3427
3471
|
label: {},
|
|
@@ -3464,11 +3508,11 @@ var Oa = [
|
|
|
3464
3508
|
loading: ""
|
|
3465
3509
|
};
|
|
3466
3510
|
return (t, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", l.class)) }, [
|
|
3467
|
-
c("div",
|
|
3511
|
+
c("div", Ga, [c("div", Ka, [c("label", {
|
|
3468
3512
|
id: m,
|
|
3469
3513
|
for: `${M(p)}-0`,
|
|
3470
3514
|
class: "text-sm"
|
|
3471
|
-
}, j(e.label), 9,
|
|
3515
|
+
}, j(e.label), 9, qa), e.helper && e.helperPlacement === "icon" ? (w(), a(Gi, {
|
|
3472
3516
|
key: 0,
|
|
3473
3517
|
text: e.helper,
|
|
3474
3518
|
label: M(r)("ui.formField.about", { label: e.label })
|
|
@@ -3477,7 +3521,7 @@ var Oa = [
|
|
|
3477
3521
|
id: h,
|
|
3478
3522
|
hidden: e.helperPlacement === "icon",
|
|
3479
3523
|
class: "text-xs text-black/65"
|
|
3480
|
-
}, j(e.helper), 9,
|
|
3524
|
+
}, j(e.helper), 9, Ja)) : o("", !0)]),
|
|
3481
3525
|
d(M(Ot), {
|
|
3482
3526
|
"model-value": x.value,
|
|
3483
3527
|
type: e.alphanumeric ? "text" : "number",
|
|
@@ -3520,32 +3564,32 @@ var Oa = [
|
|
|
3520
3564
|
"disabled",
|
|
3521
3565
|
"class"
|
|
3522
3566
|
]),
|
|
3523
|
-
d(
|
|
3567
|
+
d(Ji, {
|
|
3524
3568
|
id: g,
|
|
3525
3569
|
status: _.value,
|
|
3526
3570
|
text: v.value
|
|
3527
3571
|
}, null, 8, ["status", "text"])
|
|
3528
3572
|
], 2));
|
|
3529
3573
|
}
|
|
3530
|
-
}),
|
|
3574
|
+
}), Xa = {
|
|
3531
3575
|
key: 0,
|
|
3532
3576
|
class: "flex min-w-0 flex-1 flex-wrap gap-1"
|
|
3533
|
-
},
|
|
3577
|
+
}, Za = {
|
|
3534
3578
|
key: 1,
|
|
3535
3579
|
class: "h-5 min-w-0 flex-1 truncate"
|
|
3536
|
-
},
|
|
3580
|
+
}, Qa = { class: "flex h-5 shrink-0 items-center" }, $a = { class: "min-w-0 flex-1 truncate" }, eo = { class: "truncate" }, to = {
|
|
3537
3581
|
key: 0,
|
|
3538
3582
|
class: "flex h-5 shrink-0 items-center"
|
|
3539
|
-
},
|
|
3583
|
+
}, no = { class: "flex min-w-0 flex-1 flex-col" }, ro = {
|
|
3540
3584
|
key: 0,
|
|
3541
3585
|
class: "sr-only"
|
|
3542
|
-
},
|
|
3586
|
+
}, io = {
|
|
3543
3587
|
key: 0,
|
|
3544
3588
|
class: "text-xs text-black/65"
|
|
3545
|
-
},
|
|
3589
|
+
}, ao = {
|
|
3546
3590
|
key: 1,
|
|
3547
3591
|
class: "text-xs text-black/65"
|
|
3548
|
-
},
|
|
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({
|
|
3549
3593
|
__name: "Select",
|
|
3550
3594
|
props: /*@__PURE__*/ g({
|
|
3551
3595
|
label: {},
|
|
@@ -3606,15 +3650,15 @@ var Oa = [
|
|
|
3606
3650
|
function B(e) {
|
|
3607
3651
|
r.multiple && !oe.value && p.value.length && (e.preventDefault(), z(p.value[p.value.length - 1]));
|
|
3608
3652
|
}
|
|
3609
|
-
let H = (e) => A.value.find((t) => t.option.value === e)?.option.label ?? "", W = E([]), G = i(() => W.value[W.value.length - 1]),
|
|
3610
|
-
function
|
|
3611
|
-
|
|
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;
|
|
3612
3656
|
}
|
|
3613
|
-
function
|
|
3614
|
-
e.target.select(),
|
|
3657
|
+
function te(e) {
|
|
3658
|
+
e.target.select(), re.value = ne;
|
|
3615
3659
|
}
|
|
3616
|
-
let
|
|
3617
|
-
|
|
3660
|
+
let ne = !1, re = E(!1), ie = () => ne = !0, ae = () => {
|
|
3661
|
+
ne = !1, re.value = !1;
|
|
3618
3662
|
};
|
|
3619
3663
|
C(() => {
|
|
3620
3664
|
document.addEventListener("pointerdown", ie, !0), document.addEventListener("keydown", ae, !0), document.fonts?.load(`700 1em ${getComputedStyle(document.body).fontFamily}`).catch(() => {});
|
|
@@ -3702,7 +3746,7 @@ var Oa = [
|
|
|
3702
3746
|
e.option.description,
|
|
3703
3747
|
e.path
|
|
3704
3748
|
].filter(Boolean).join(" ") : e.option.label;
|
|
3705
|
-
return (i, f) => (w(), a(
|
|
3749
|
+
return (i, f) => (w(), a($i, {
|
|
3706
3750
|
label: e.label,
|
|
3707
3751
|
helper: e.helper,
|
|
3708
3752
|
"helper-placement": e.helperPlacement,
|
|
@@ -3724,14 +3768,14 @@ var Oa = [
|
|
|
3724
3768
|
class: "contents"
|
|
3725
3769
|
} : {}, {
|
|
3726
3770
|
"onUpdate:modelValue": h,
|
|
3727
|
-
open:
|
|
3728
|
-
"onUpdate:open":
|
|
3771
|
+
open: q.value,
|
|
3772
|
+
"onUpdate:open": J
|
|
3729
3773
|
}), {
|
|
3730
3774
|
default: V(() => [e.searchable ? (w(), a(M(Je), {
|
|
3731
3775
|
key: 0,
|
|
3732
|
-
class: y(
|
|
3733
|
-
onPointerdown: f[4] ||= (e) =>
|
|
3734
|
-
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)
|
|
3735
3779
|
}, {
|
|
3736
3780
|
default: V(() => [
|
|
3737
3781
|
O(i.$slots, "leading", {}, () => [L.value?.icon ? (w(), a(k(L.value.icon), {
|
|
@@ -3770,9 +3814,9 @@ var Oa = [
|
|
|
3770
3814
|
"aria-describedby": p,
|
|
3771
3815
|
autocomplete: "off",
|
|
3772
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")),
|
|
3773
|
-
"data-pointer-focus":
|
|
3774
|
-
onFocus:
|
|
3775
|
-
onBlur: f[2] ||= (e) =>
|
|
3817
|
+
"data-pointer-focus": re.value || void 0,
|
|
3818
|
+
onFocus: te,
|
|
3819
|
+
onBlur: f[2] ||= (e) => re.value = !1,
|
|
3776
3820
|
onKeydown: [f[3] ||= (e) => e.target.ariaExpanded === "true" && xe(e), U(B, ["backspace"])]
|
|
3777
3821
|
}, null, 8, [
|
|
3778
3822
|
"id",
|
|
@@ -3791,7 +3835,7 @@ var Oa = [
|
|
|
3791
3835
|
}, {
|
|
3792
3836
|
default: V(() => [d(M(ue), {
|
|
3793
3837
|
"aria-hidden": "true",
|
|
3794
|
-
class: y(
|
|
3838
|
+
class: y(co)
|
|
3795
3839
|
})]),
|
|
3796
3840
|
_: 1
|
|
3797
3841
|
}, 8, ["aria-label"])
|
|
@@ -3802,16 +3846,16 @@ var Oa = [
|
|
|
3802
3846
|
id: r,
|
|
3803
3847
|
"aria-invalid": v,
|
|
3804
3848
|
"aria-describedby": p,
|
|
3805
|
-
"data-pointer-focus":
|
|
3806
|
-
onBlur: f[6] ||= (e) =>
|
|
3807
|
-
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"))
|
|
3808
3852
|
}, {
|
|
3809
3853
|
default: V(() => [
|
|
3810
3854
|
O(i.$slots, "leading", {}, () => [L.value?.icon ? (w(), a(k(L.value.icon), {
|
|
3811
3855
|
key: 0,
|
|
3812
3856
|
"aria-hidden": "true"
|
|
3813
3857
|
})) : o("", !0)]),
|
|
3814
|
-
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, {
|
|
3815
3859
|
key: String(e.value),
|
|
3816
3860
|
size: "sm"
|
|
3817
3861
|
}, l({
|
|
@@ -3821,10 +3865,10 @@ var Oa = [
|
|
|
3821
3865
|
name: "leading",
|
|
3822
3866
|
fn: V(() => [(w(), a(k(e.icon), { "aria-hidden": "true" }))]),
|
|
3823
3867
|
key: "0"
|
|
3824
|
-
} : void 0]), 1024))), 128))])) : (w(), s("span",
|
|
3868
|
+
} : void 0]), 1024))), 128))])) : (w(), s("span", Za, j(L.value?.label ?? g.value), 1)),
|
|
3825
3869
|
d(M(ue), {
|
|
3826
3870
|
"aria-hidden": "true",
|
|
3827
|
-
class: y(
|
|
3871
|
+
class: y(co)
|
|
3828
3872
|
})
|
|
3829
3873
|
]),
|
|
3830
3874
|
_: 3
|
|
@@ -3859,10 +3903,10 @@ var Oa = [
|
|
|
3859
3903
|
class: y(M(X)(Ce, "font-bold")),
|
|
3860
3904
|
onSelect: be
|
|
3861
3905
|
}, {
|
|
3862
|
-
default: V(() => [c("span",
|
|
3906
|
+
default: V(() => [c("span", Qa, [d(M(de), {
|
|
3863
3907
|
"aria-hidden": "true",
|
|
3864
3908
|
class: "size-4"
|
|
3865
|
-
})]), c("span",
|
|
3909
|
+
})]), c("span", $a, [f[9] ||= c("span", { class: "sr-only" }, "Back from ", -1), u(j(G.value.label), 1)])]),
|
|
3866
3910
|
_: 1
|
|
3867
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),
|
|
3868
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), {
|
|
@@ -3877,7 +3921,7 @@ var Oa = [
|
|
|
3877
3921
|
key: 0,
|
|
3878
3922
|
"aria-hidden": "true",
|
|
3879
3923
|
class: "size-3.5 shrink-0"
|
|
3880
|
-
})) : o("", !0), c("span",
|
|
3924
|
+
})) : o("", !0), c("span", eo, j(e.label), 1)]),
|
|
3881
3925
|
_: 2
|
|
3882
3926
|
}, 1024)) : o("", !0), (w(!0), s(n, null, D(e.rows, (e) => (w(), a(k(Y.value.Item), {
|
|
3883
3927
|
key: e.key,
|
|
@@ -3889,19 +3933,19 @@ var Oa = [
|
|
|
3889
3933
|
onSelect: (t) => e.parent && ye(t, e.option)
|
|
3890
3934
|
}, {
|
|
3891
3935
|
default: V(() => [
|
|
3892
|
-
e.option.icon ? (w(), s("span",
|
|
3936
|
+
e.option.icon ? (w(), s("span", to, [(w(), a(k(e.option.icon), {
|
|
3893
3937
|
"aria-hidden": "true",
|
|
3894
3938
|
class: "size-4 opacity-70"
|
|
3895
3939
|
}))])) : o("", !0),
|
|
3896
|
-
c("span",
|
|
3940
|
+
c("span", no, [
|
|
3897
3941
|
(w(), a(k(Y.value.ItemText), { class: "truncate in-data-[state=checked]:font-bold" }, {
|
|
3898
|
-
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)]),
|
|
3899
3943
|
_: 2
|
|
3900
3944
|
}, 1024)),
|
|
3901
|
-
e.path ? (w(), s("span",
|
|
3902
|
-
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)
|
|
3903
3947
|
]),
|
|
3904
|
-
c("span",
|
|
3948
|
+
c("span", oo, [e.parent ? (w(), a(M(fe), {
|
|
3905
3949
|
key: 0,
|
|
3906
3950
|
"aria-hidden": "true",
|
|
3907
3951
|
class: "size-4 opacity-70"
|
|
@@ -3949,7 +3993,7 @@ var Oa = [
|
|
|
3949
3993
|
"class"
|
|
3950
3994
|
]));
|
|
3951
3995
|
}
|
|
3952
|
-
}),
|
|
3996
|
+
}), uo = { class: "flex items-start gap-2" }, fo = /* @__PURE__ */ f({
|
|
3953
3997
|
__name: "Checkbox",
|
|
3954
3998
|
props: /*@__PURE__*/ g({
|
|
3955
3999
|
label: {},
|
|
@@ -3988,7 +4032,7 @@ var Oa = [
|
|
|
3988
4032
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus",
|
|
3989
4033
|
"[&_svg]:size-3.5 [&_svg]:stroke-3"
|
|
3990
4034
|
];
|
|
3991
|
-
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", e.disabled && "opacity-40", t.class)) }, [c("div",
|
|
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), {
|
|
3992
4036
|
id: l,
|
|
3993
4037
|
modelValue: n.value,
|
|
3994
4038
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e,
|
|
@@ -4030,13 +4074,13 @@ var Oa = [
|
|
|
4030
4074
|
key: 0,
|
|
4031
4075
|
id: u,
|
|
4032
4076
|
class: "text-xs text-black/65"
|
|
4033
|
-
}, j(e.description), 1)) : o("", !0)], 2)]), d(
|
|
4077
|
+
}, j(e.description), 1)) : o("", !0)], 2)]), d(Ji, {
|
|
4034
4078
|
id: f,
|
|
4035
4079
|
status: e.errorText ? "error" : void 0,
|
|
4036
4080
|
text: e.errorText
|
|
4037
4081
|
}, null, 8, ["status", "text"])], 2));
|
|
4038
4082
|
}
|
|
4039
|
-
}),
|
|
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({
|
|
4040
4084
|
__name: "RadioGroup",
|
|
4041
4085
|
props: /*@__PURE__*/ g({
|
|
4042
4086
|
label: {},
|
|
@@ -4071,10 +4115,10 @@ var Oa = [
|
|
|
4071
4115
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus"
|
|
4072
4116
|
];
|
|
4073
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)) }, [
|
|
4074
|
-
c("div",
|
|
4118
|
+
c("div", po, [c("div", mo, [c("span", {
|
|
4075
4119
|
id: f,
|
|
4076
4120
|
class: "text-sm"
|
|
4077
|
-
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(
|
|
4121
|
+
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(Gi, {
|
|
4078
4122
|
key: 0,
|
|
4079
4123
|
text: e.helper,
|
|
4080
4124
|
label: M(t)("ui.formField.about", { label: e.label })
|
|
@@ -4083,7 +4127,7 @@ var Oa = [
|
|
|
4083
4127
|
id: p,
|
|
4084
4128
|
hidden: e.helperPlacement === "icon",
|
|
4085
4129
|
class: "text-xs text-black/65"
|
|
4086
|
-
}, j(e.helper), 9,
|
|
4130
|
+
}, j(e.helper), 9, ho)) : o("", !0)]),
|
|
4087
4131
|
d(M(Bt), {
|
|
4088
4132
|
modelValue: l.value,
|
|
4089
4133
|
"onUpdate:modelValue": v[0] ||= (e) => l.value = e,
|
|
@@ -4119,11 +4163,11 @@ var Oa = [
|
|
|
4119
4163
|
}, [c("label", {
|
|
4120
4164
|
for: `${M(u)}-${n}`,
|
|
4121
4165
|
class: y(M(X)("text-sm", e.disabled || t.disabled ? "cursor-not-allowed" : "cursor-pointer"))
|
|
4122
|
-
}, j(t.label), 11,
|
|
4166
|
+
}, j(t.label), 11, _o), t.description ? (w(), s("p", {
|
|
4123
4167
|
key: 0,
|
|
4124
4168
|
id: `${M(u)}-${n}-description`,
|
|
4125
4169
|
class: "text-xs text-black/65"
|
|
4126
|
-
}, j(t.description), 9,
|
|
4170
|
+
}, j(t.description), 9, vo)) : o("", !0)], 10, go)]))), 128))]),
|
|
4127
4171
|
_: 1
|
|
4128
4172
|
}, 8, [
|
|
4129
4173
|
"modelValue",
|
|
@@ -4133,14 +4177,14 @@ var Oa = [
|
|
|
4133
4177
|
"aria-describedby",
|
|
4134
4178
|
"aria-invalid"
|
|
4135
4179
|
]),
|
|
4136
|
-
d(
|
|
4180
|
+
d(Ji, {
|
|
4137
4181
|
id: m,
|
|
4138
4182
|
status: e.errorText ? "error" : void 0,
|
|
4139
4183
|
text: e.errorText
|
|
4140
4184
|
}, null, 8, ["status", "text"])
|
|
4141
4185
|
], 2));
|
|
4142
4186
|
}
|
|
4143
|
-
}),
|
|
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({
|
|
4144
4188
|
__name: "Switch",
|
|
4145
4189
|
props: /*@__PURE__*/ g({
|
|
4146
4190
|
label: {},
|
|
@@ -4177,7 +4221,7 @@ var Oa = [
|
|
|
4177
4221
|
"disabled:cursor-not-allowed",
|
|
4178
4222
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus"
|
|
4179
4223
|
];
|
|
4180
|
-
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", e.disabled && "opacity-40", t.class)) }, [c("div",
|
|
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), {
|
|
4181
4225
|
id: a,
|
|
4182
4226
|
modelValue: n.value,
|
|
4183
4227
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e,
|
|
@@ -4187,7 +4231,7 @@ var Oa = [
|
|
|
4187
4231
|
"aria-describedby": m.value,
|
|
4188
4232
|
class: y(g)
|
|
4189
4233
|
}, {
|
|
4190
|
-
default: V(() => [d(M(en), { class: y(
|
|
4234
|
+
default: V(() => [d(M(en), { class: y(xo) })]),
|
|
4191
4235
|
_: 1
|
|
4192
4236
|
}, 8, [
|
|
4193
4237
|
"modelValue",
|
|
@@ -4205,19 +4249,19 @@ var Oa = [
|
|
|
4205
4249
|
key: 0,
|
|
4206
4250
|
id: l,
|
|
4207
4251
|
class: "text-xs text-black/65"
|
|
4208
|
-
}, j(e.description), 1)) : o("", !0)], 2)]), d(
|
|
4252
|
+
}, j(e.description), 1)) : o("", !0)], 2)]), d(Ji, {
|
|
4209
4253
|
id: u,
|
|
4210
4254
|
status: f.value,
|
|
4211
4255
|
text: p.value
|
|
4212
4256
|
}, null, 8, ["status", "text"])], 2));
|
|
4213
4257
|
}
|
|
4214
|
-
}),
|
|
4258
|
+
}), Co = [
|
|
4215
4259
|
"id",
|
|
4216
4260
|
"placeholder",
|
|
4217
4261
|
"disabled",
|
|
4218
4262
|
"aria-invalid",
|
|
4219
4263
|
"aria-describedby"
|
|
4220
|
-
],
|
|
4264
|
+
], wo = /* @__PURE__ */ f({
|
|
4221
4265
|
inheritAttrs: !1,
|
|
4222
4266
|
__name: "InputTextArea",
|
|
4223
4267
|
props: /*@__PURE__*/ g({
|
|
@@ -4245,7 +4289,7 @@ var Oa = [
|
|
|
4245
4289
|
emits: ["update:modelValue"],
|
|
4246
4290
|
setup(e, { expose: t }) {
|
|
4247
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();
|
|
4248
|
-
return t({ focus: () => d.value?.focus() }), (t, r) => (w(), a(
|
|
4292
|
+
return t({ focus: () => d.value?.focus() }), (t, r) => (w(), a($i, {
|
|
4249
4293
|
label: e.label,
|
|
4250
4294
|
helper: e.helper,
|
|
4251
4295
|
"helper-placement": e.helperPlacement,
|
|
@@ -4267,7 +4311,7 @@ var Oa = [
|
|
|
4267
4311
|
"aria-invalid": a,
|
|
4268
4312
|
"aria-describedby": i,
|
|
4269
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"
|
|
4270
|
-
}), null, 16,
|
|
4314
|
+
}), null, 16, Co), [[R, o.value]])]),
|
|
4271
4315
|
_: 1
|
|
4272
4316
|
}, 8, [
|
|
4273
4317
|
"label",
|
|
@@ -4281,7 +4325,7 @@ var Oa = [
|
|
|
4281
4325
|
"class"
|
|
4282
4326
|
]));
|
|
4283
4327
|
}
|
|
4284
|
-
}),
|
|
4328
|
+
}), To = { class: "flex items-center gap-1" }, Eo = ["hidden"], Do = ["aria-describedby", "aria-invalid"], Oo = /* @__PURE__ */ f({
|
|
4285
4329
|
__name: "CheckboxGroup",
|
|
4286
4330
|
props: /*@__PURE__*/ g({
|
|
4287
4331
|
label: {},
|
|
@@ -4309,10 +4353,10 @@ var Oa = [
|
|
|
4309
4353
|
l.value = t ? [...l.value, e] : l.value.filter((t) => t !== e);
|
|
4310
4354
|
}
|
|
4311
4355
|
return (i, u) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", t.class)) }, [
|
|
4312
|
-
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", {
|
|
4313
4357
|
id: f,
|
|
4314
4358
|
class: "text-sm"
|
|
4315
|
-
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(
|
|
4359
|
+
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(Gi, {
|
|
4316
4360
|
key: 0,
|
|
4317
4361
|
text: e.helper,
|
|
4318
4362
|
label: M(r)("ui.formField.about", { label: e.label })
|
|
@@ -4321,14 +4365,14 @@ var Oa = [
|
|
|
4321
4365
|
id: p,
|
|
4322
4366
|
hidden: e.helperPlacement === "icon",
|
|
4323
4367
|
class: "text-xs text-black/65"
|
|
4324
|
-
}, j(e.helper), 9,
|
|
4368
|
+
}, j(e.helper), 9, Eo)) : o("", !0)], 2),
|
|
4325
4369
|
c("div", {
|
|
4326
4370
|
role: "group",
|
|
4327
4371
|
"aria-labelledby": f,
|
|
4328
4372
|
"aria-describedby": h.value,
|
|
4329
4373
|
"aria-invalid": e.errorText ? !0 : void 0,
|
|
4330
4374
|
class: "flex flex-col gap-3"
|
|
4331
|
-
}, [(w(!0), s(n, null, D(e.options, (t) => (w(), a(
|
|
4375
|
+
}, [(w(!0), s(n, null, D(e.options, (t) => (w(), a(fo, {
|
|
4332
4376
|
key: String(t.value),
|
|
4333
4377
|
"model-value": l.value.includes(t.value),
|
|
4334
4378
|
label: t.label,
|
|
@@ -4341,15 +4385,15 @@ var Oa = [
|
|
|
4341
4385
|
"description",
|
|
4342
4386
|
"disabled",
|
|
4343
4387
|
"onUpdate:modelValue"
|
|
4344
|
-
]))), 128))], 8,
|
|
4345
|
-
d(
|
|
4388
|
+
]))), 128))], 8, Do),
|
|
4389
|
+
d(Ji, {
|
|
4346
4390
|
id: m,
|
|
4347
4391
|
status: e.errorText ? "error" : void 0,
|
|
4348
4392
|
text: e.errorText
|
|
4349
4393
|
}, null, 8, ["status", "text"])
|
|
4350
4394
|
], 2));
|
|
4351
4395
|
}
|
|
4352
|
-
}),
|
|
4396
|
+
}), ko = /* @__PURE__ */ f({
|
|
4353
4397
|
__name: "LanguageSwitcher",
|
|
4354
4398
|
props: {
|
|
4355
4399
|
label: {},
|
|
@@ -4379,7 +4423,7 @@ var Oa = [
|
|
|
4379
4423
|
label: s(e),
|
|
4380
4424
|
value: e
|
|
4381
4425
|
})));
|
|
4382
|
-
return (i, o) => (w(), a(
|
|
4426
|
+
return (i, o) => (w(), a(lo, {
|
|
4383
4427
|
modelValue: M(r),
|
|
4384
4428
|
"onUpdate:modelValue": o[0] ||= (e) => h(r) ? r.value = e : null,
|
|
4385
4429
|
label: e.label ?? M(n)("ui.languageSwitcher.label"),
|
|
@@ -4399,7 +4443,123 @@ var Oa = [
|
|
|
4399
4443
|
"class"
|
|
4400
4444
|
]));
|
|
4401
4445
|
}
|
|
4402
|
-
}),
|
|
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({
|
|
4403
4563
|
__name: "EmptyState",
|
|
4404
4564
|
props: {
|
|
4405
4565
|
title: {},
|
|
@@ -4455,15 +4615,15 @@ var Oa = [
|
|
|
4455
4615
|
}, [O(r.$slots, "actions")], 2)) : o("", !0)
|
|
4456
4616
|
], 2));
|
|
4457
4617
|
}
|
|
4458
|
-
}),
|
|
4618
|
+
}), Lo = new Intl.Collator("en-GB", {
|
|
4459
4619
|
numeric: !0,
|
|
4460
4620
|
sensitivity: "base"
|
|
4461
4621
|
});
|
|
4462
|
-
function
|
|
4622
|
+
function Ro(e, t) {
|
|
4463
4623
|
let n = e == null || e === "", r = t == null || t === "";
|
|
4464
|
-
return n || r ? n === r ? 0 : n ? 1 : -1 : typeof e == "number" && typeof t == "number" ? e - t : e instanceof Date && t instanceof Date ? e.getTime() - t.getTime() : typeof e == "boolean" && typeof t == "boolean" ? Number(e) - Number(t) :
|
|
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));
|
|
4465
4625
|
}
|
|
4466
|
-
function
|
|
4626
|
+
function zo(e, t, n) {
|
|
4467
4627
|
let r = n && t.find((e) => e.key === n.key);
|
|
4468
4628
|
if (!n || !r) return [...e];
|
|
4469
4629
|
let i = r.sortValue ?? ((e) => e[r.key]), a = n.direction === "asc" ? 1 : -1;
|
|
@@ -4473,10 +4633,10 @@ function Do(e, t, n) {
|
|
|
4473
4633
|
value: i(e)
|
|
4474
4634
|
})).sort((e, t) => {
|
|
4475
4635
|
let n = e.value === null || e.value === void 0 || e.value === "", r = t.value === null || t.value === void 0 || t.value === "";
|
|
4476
|
-
return (n || r ?
|
|
4636
|
+
return (n || r ? Ro(e.value, t.value) : a * Ro(e.value, t.value)) || e.index - t.index;
|
|
4477
4637
|
}).map((e) => e.row);
|
|
4478
4638
|
}
|
|
4479
|
-
function
|
|
4639
|
+
function Bo(e, t) {
|
|
4480
4640
|
return e?.key === t ? e.direction === "asc" ? {
|
|
4481
4641
|
key: t,
|
|
4482
4642
|
direction: "desc"
|
|
@@ -4486,24 +4646,24 @@ function Oo(e, t) {
|
|
|
4486
4646
|
};
|
|
4487
4647
|
}
|
|
4488
4648
|
// src/components/Table/Table.vue?vue&type=script&setup=true&lang.ts
|
|
4489
|
-
var
|
|
4649
|
+
var Vo = [
|
|
4490
4650
|
"tabindex",
|
|
4491
4651
|
"role",
|
|
4492
4652
|
"aria-labelledby",
|
|
4493
4653
|
"aria-label"
|
|
4494
|
-
],
|
|
4654
|
+
], Ho = ["aria-busy"], Uo = {
|
|
4495
4655
|
key: 1,
|
|
4496
4656
|
class: "sr-only"
|
|
4497
|
-
},
|
|
4657
|
+
}, Wo = ["aria-sort"], Go = {
|
|
4498
4658
|
key: 0,
|
|
4499
4659
|
class: "sr-only"
|
|
4500
|
-
},
|
|
4660
|
+
}, Ko = ["onClick"], qo = { key: 0 }, Jo = ["colspan"], Yo = {
|
|
4501
4661
|
key: 0,
|
|
4502
4662
|
class: "inline-flex items-center gap-2"
|
|
4503
|
-
},
|
|
4663
|
+
}, Xo = ["onClick"], Zo = {
|
|
4504
4664
|
key: 1,
|
|
4505
4665
|
"aria-hidden": "true"
|
|
4506
|
-
},
|
|
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({
|
|
4507
4667
|
__name: "Table",
|
|
4508
4668
|
props: /*@__PURE__*/ g({
|
|
4509
4669
|
columns: {},
|
|
@@ -4553,7 +4713,7 @@ var ko = [
|
|
|
4553
4713
|
function T(e, t) {
|
|
4554
4714
|
e.target.closest("button, label, .sr-only") || t();
|
|
4555
4715
|
}
|
|
4556
|
-
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));
|
|
4557
4717
|
function I(e, t) {
|
|
4558
4718
|
return typeof r.rowKey == "function" ? r.rowKey(e, t) : r.rowKey ? e[r.rowKey] : t;
|
|
4559
4719
|
}
|
|
@@ -4580,17 +4740,17 @@ var ko = [
|
|
|
4580
4740
|
function ee(e) {
|
|
4581
4741
|
return X(e.align === "end" && "text-right", e.nowrap !== !1 && "whitespace-nowrap", e.class);
|
|
4582
4742
|
}
|
|
4583
|
-
let W = E(), G = E(!1),
|
|
4584
|
-
function
|
|
4743
|
+
let W = E(), G = E(!1), J;
|
|
4744
|
+
function te() {
|
|
4585
4745
|
let e = W.value;
|
|
4586
4746
|
e && (G.value = e.scrollWidth > e.clientWidth + 1 || e.scrollHeight > e.clientHeight + 1);
|
|
4587
4747
|
}
|
|
4588
4748
|
return C(() => {
|
|
4589
|
-
|
|
4590
|
-
}), 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", {
|
|
4591
4751
|
ref_key: "scroller",
|
|
4592
4752
|
ref: W,
|
|
4593
|
-
class: y(M(X)("relative overflow-auto", G.value &&
|
|
4753
|
+
class: y(M(X)("relative overflow-auto", G.value && ns, r.class)),
|
|
4594
4754
|
tabindex: G.value ? 0 : void 0,
|
|
4595
4755
|
role: G.value ? "region" : void 0,
|
|
4596
4756
|
"aria-labelledby": G.value && (e.caption || i.$slots.caption) ? p : void 0,
|
|
@@ -4607,29 +4767,29 @@ var ko = [
|
|
|
4607
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", {
|
|
4608
4768
|
key: 0,
|
|
4609
4769
|
scope: "col",
|
|
4610
|
-
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)),
|
|
4611
4771
|
onClick: f[1] ||= (e) => T(e, () => h.value.length && x(b.value !== !0))
|
|
4612
|
-
}, [h.value.length ? (w(), a(
|
|
4772
|
+
}, [h.value.length ? (w(), a(fo, {
|
|
4613
4773
|
key: 0,
|
|
4614
4774
|
"model-value": b.value,
|
|
4615
4775
|
label: M(t)("ui.table.selectAll"),
|
|
4616
4776
|
"hide-label": "",
|
|
4617
4777
|
"onUpdate:modelValue": f[0] ||= (e) => x(e === !0)
|
|
4618
|
-
}, 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", {
|
|
4619
4779
|
key: e.key,
|
|
4620
4780
|
scope: "col",
|
|
4621
4781
|
"aria-sort": L(e),
|
|
4622
4782
|
class: y(M(X)("border-b border-black/15 font-bold text-black/65", U.value, ee(e)))
|
|
4623
|
-
}, [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", {
|
|
4624
4784
|
key: 1,
|
|
4625
4785
|
type: "button",
|
|
4626
|
-
class: y(M(X)("-mx-1 inline-flex cursor-pointer items-center gap-1 rounded px-1 font-bold hover:text-black", e.align === "end" && "flex-row-reverse", l.value?.key === e.key && "text-black",
|
|
4627
|
-
onClick: (t) => l.value = M(
|
|
4628
|
-
}, [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), {
|
|
4629
4789
|
key: 0,
|
|
4630
4790
|
class: "size-4 shrink-0",
|
|
4631
4791
|
"aria-hidden": "true"
|
|
4632
|
-
})) : l.value?.key === e.key ? (w(), a(M(
|
|
4792
|
+
})) : l.value?.key === e.key ? (w(), a(M(q), {
|
|
4633
4793
|
key: 1,
|
|
4634
4794
|
class: "size-4 shrink-0",
|
|
4635
4795
|
"aria-hidden": "true"
|
|
@@ -4637,24 +4797,24 @@ var ko = [
|
|
|
4637
4797
|
key: 2,
|
|
4638
4798
|
class: "size-4 shrink-0 text-black/40",
|
|
4639
4799
|
"aria-hidden": "true"
|
|
4640
|
-
}))], 10,
|
|
4800
|
+
}))], 10, Ko)) : (w(), s(n, { key: 2 }, [u(j(e.label), 1)], 64))])], 10, Wo))), 128))])], 2),
|
|
4641
4801
|
c("tbody", { class: y(M(X)(e.loading && N.value.length && "opacity-50 transition-opacity")) }, [
|
|
4642
|
-
N.value.length ? o("", !0) : (w(), s("tr",
|
|
4802
|
+
N.value.length ? o("", !0) : (w(), s("tr", qo, [c("td", {
|
|
4643
4803
|
colspan: A.value,
|
|
4644
4804
|
class: "px-4 py-8 text-center text-black/65"
|
|
4645
|
-
}, [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, {
|
|
4646
4806
|
size: "sm",
|
|
4647
4807
|
description: e.emptyText ?? M(t)("ui.table.empty"),
|
|
4648
4808
|
class: "p-0"
|
|
4649
|
-
}, null, 8, ["description"])], void 0, 1)], 8,
|
|
4809
|
+
}, null, 8, ["description"])], void 0, 1)], 8, Jo)])),
|
|
4650
4810
|
(w(!0), s(n, null, D(N.value, (r, c) => (w(), s("tr", {
|
|
4651
4811
|
key: I(r, c),
|
|
4652
4812
|
class: y(M(X)("group/row", z(r, c) && H, e.ui?.row))
|
|
4653
4813
|
}, [e.selectable ? (w(), s("td", {
|
|
4654
4814
|
key: 0,
|
|
4655
|
-
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)),
|
|
4656
4816
|
onClick: (e) => m(r) && T(e, () => v(r, c, !g(r, c)))
|
|
4657
|
-
}, [m(r) ? (w(), a(
|
|
4817
|
+
}, [m(r) ? (w(), a(fo, {
|
|
4658
4818
|
key: 0,
|
|
4659
4819
|
"model-value": g(r, c),
|
|
4660
4820
|
label: e.rowLabel ? e.rowLabel(r, c) : M(t)("ui.table.selectRow", { n: c + 1 }),
|
|
@@ -4664,7 +4824,7 @@ var ko = [
|
|
|
4664
4824
|
"model-value",
|
|
4665
4825
|
"label",
|
|
4666
4826
|
"onUpdate:modelValue"
|
|
4667
|
-
])) : 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"), {
|
|
4668
4828
|
key: t.key,
|
|
4669
4829
|
scope: t.rowHeader ? "row" : void 0,
|
|
4670
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)))
|
|
@@ -4676,7 +4836,7 @@ var ko = [
|
|
|
4676
4836
|
"data-row-overlay": "",
|
|
4677
4837
|
tabindex: "-1",
|
|
4678
4838
|
"aria-hidden": "true",
|
|
4679
|
-
class:
|
|
4839
|
+
class: es
|
|
4680
4840
|
}), null, 16)) : o("", !0), t.key === R.value && z(r, c) ? (w(), a(k(e.linkComponent), _({
|
|
4681
4841
|
key: 1,
|
|
4682
4842
|
ref_for: !0
|
|
@@ -4697,33 +4857,33 @@ var ko = [
|
|
|
4697
4857
|
}, () => [u(j(r[t.key] ?? ""), 1)], void 0, 2)]),
|
|
4698
4858
|
_: 2
|
|
4699
4859
|
}, 1032, ["scope", "class"]))), 128))], 2))), 128)),
|
|
4700
|
-
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", {
|
|
4701
4861
|
colspan: A.value,
|
|
4702
4862
|
class: "h-2 p-0 sm:h-4"
|
|
4703
|
-
}, null, 8,
|
|
4863
|
+
}, null, 8, Qo)])) : o("", !0)
|
|
4704
4864
|
], 2),
|
|
4705
4865
|
i.$slots.footer ? (w(), s("tfoot", {
|
|
4706
4866
|
key: 1,
|
|
4707
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"))
|
|
4708
4868
|
}, [O(i.$slots, "footer")], 2)) : o("", !0)
|
|
4709
|
-
], 10,
|
|
4869
|
+
], 10, Ho)], 10, Vo));
|
|
4710
4870
|
}
|
|
4711
|
-
}),
|
|
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 = {
|
|
4712
4872
|
key: 1,
|
|
4713
4873
|
class: "sr-only"
|
|
4714
|
-
},
|
|
4874
|
+
}, cs = {
|
|
4715
4875
|
key: 2,
|
|
4716
4876
|
class: "font-bold tabular-nums"
|
|
4717
|
-
},
|
|
4877
|
+
}, ls = {
|
|
4718
4878
|
key: 3,
|
|
4719
4879
|
class: "text-black/65"
|
|
4720
|
-
},
|
|
4880
|
+
}, us = {
|
|
4721
4881
|
key: 0,
|
|
4722
4882
|
class: "text-sm text-black/65"
|
|
4723
|
-
},
|
|
4883
|
+
}, ds = {
|
|
4724
4884
|
key: 1,
|
|
4725
4885
|
class: "mt-2 text-sm"
|
|
4726
|
-
},
|
|
4886
|
+
}, fs = /* @__PURE__ */ f({
|
|
4727
4887
|
__name: "StatTile",
|
|
4728
4888
|
props: {
|
|
4729
4889
|
label: {},
|
|
@@ -4747,7 +4907,7 @@ var ko = [
|
|
|
4747
4907
|
positive: "text-green",
|
|
4748
4908
|
negative: "text-red",
|
|
4749
4909
|
neutral: "text-black/65"
|
|
4750
|
-
}, 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(() => ({
|
|
4751
4911
|
up: t("ui.statTile.up"),
|
|
4752
4912
|
down: t("ui.statTile.down"),
|
|
4753
4913
|
flat: t("ui.statTile.flat")
|
|
@@ -4758,12 +4918,12 @@ var ko = [
|
|
|
4758
4918
|
ui: { body: "gap-1" }
|
|
4759
4919
|
}, {
|
|
4760
4920
|
default: V(() => [
|
|
4761
|
-
c("p",
|
|
4921
|
+
c("p", is, [e.icon ? (w(), a(k(e.icon), {
|
|
4762
4922
|
key: 0,
|
|
4763
4923
|
class: "size-4 shrink-0",
|
|
4764
4924
|
"aria-hidden": "true"
|
|
4765
4925
|
})) : o("", !0), u(" " + j(e.label), 1)]),
|
|
4766
|
-
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", {
|
|
4767
4927
|
key: 0,
|
|
4768
4928
|
class: y(M(X)("inline-flex items-center gap-0.5 text-sm", l[r.value]))
|
|
4769
4929
|
}, [
|
|
@@ -4772,29 +4932,29 @@ var ko = [
|
|
|
4772
4932
|
class: "size-4 shrink-0",
|
|
4773
4933
|
"aria-hidden": "true"
|
|
4774
4934
|
})) : o("", !0),
|
|
4775
|
-
e.trend ? (w(), s("span",
|
|
4776
|
-
e.change ? (w(), s("span",
|
|
4777
|
-
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)
|
|
4778
4938
|
], 2)) : o("", !0)]),
|
|
4779
|
-
e.description || t.$slots.description ? (w(), s("p",
|
|
4780
|
-
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)
|
|
4781
4941
|
]),
|
|
4782
4942
|
_: 3
|
|
4783
4943
|
}, 8, ["class"]));
|
|
4784
4944
|
}
|
|
4785
|
-
}),
|
|
4945
|
+
}), ps = { class: "col-span-2 text-black/65 @sm:col-span-1" }, ms = { class: "sr-only" }, hs = {
|
|
4786
4946
|
key: 0,
|
|
4787
4947
|
class: "mt-0.5 block text-black/65"
|
|
4788
|
-
},
|
|
4948
|
+
}, gs = {
|
|
4789
4949
|
key: 0,
|
|
4790
4950
|
class: "justify-self-end"
|
|
4791
|
-
},
|
|
4951
|
+
}, _s = { class: "text-black/65" }, vs = { class: "sr-only" }, ys = {
|
|
4792
4952
|
key: 0,
|
|
4793
4953
|
class: "mt-0.5 block font-normal text-black/65"
|
|
4794
|
-
},
|
|
4954
|
+
}, bs = {
|
|
4795
4955
|
key: 1,
|
|
4796
4956
|
class: "mt-1 block font-normal"
|
|
4797
|
-
},
|
|
4957
|
+
}, xs = /* @__PURE__ */ f({
|
|
4798
4958
|
__name: "SummaryList",
|
|
4799
4959
|
props: {
|
|
4800
4960
|
items: {},
|
|
@@ -4819,37 +4979,37 @@ var ko = [
|
|
|
4819
4979
|
key: r.label,
|
|
4820
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]))
|
|
4821
4981
|
}, [
|
|
4822
|
-
c("dt",
|
|
4982
|
+
c("dt", ps, j(r.label), 1),
|
|
4823
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", {
|
|
4824
4984
|
item: r,
|
|
4825
4985
|
index: f
|
|
4826
4986
|
}, () => [i(r.value) ? (w(), s(n, { key: 1 }, [d[0] ||= c("span", {
|
|
4827
4987
|
class: "text-black/40",
|
|
4828
4988
|
"aria-hidden": "true"
|
|
4829
|
-
}, "—", -1), c("span",
|
|
4830
|
-
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", {
|
|
4831
4991
|
item: r,
|
|
4832
4992
|
index: f
|
|
4833
4993
|
})])) : o("", !0)
|
|
4834
4994
|
], 2))), 128)) : (w(!0), s(n, { key: 1 }, D(e.items, (r, a) => (w(), s("div", {
|
|
4835
4995
|
key: r.label,
|
|
4836
4996
|
class: y(e.layout === "compact" ? "col-span-2 grid grid-cols-subgrid items-baseline" : "flex min-w-0 flex-col gap-1")
|
|
4837
|
-
}, [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")) }, [
|
|
4838
4998
|
O(l.$slots, "value", {
|
|
4839
4999
|
item: r,
|
|
4840
5000
|
index: a
|
|
4841
5001
|
}, () => [i(r.value) ? (w(), s(n, { key: 1 }, [d[1] ||= c("span", {
|
|
4842
5002
|
class: "text-black/40",
|
|
4843
5003
|
"aria-hidden": "true"
|
|
4844
|
-
}, "—", -1), c("span",
|
|
4845
|
-
r.description ? (w(), s("span",
|
|
4846
|
-
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", {
|
|
4847
5007
|
item: r,
|
|
4848
5008
|
index: a
|
|
4849
5009
|
})])) : o("", !0)
|
|
4850
5010
|
], 2)], 2))), 128))], 2)], 2));
|
|
4851
5011
|
}
|
|
4852
|
-
}),
|
|
5012
|
+
}), Ss = { class: "flex h-5 shrink-0 items-center" }, Cs = { class: "sr-only" }, ws = /* @__PURE__ */ f({
|
|
4853
5013
|
__name: "Checklist",
|
|
4854
5014
|
props: {
|
|
4855
5015
|
items: {},
|
|
@@ -4867,7 +5027,7 @@ var ko = [
|
|
|
4867
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", {
|
|
4868
5028
|
key: t.label,
|
|
4869
5029
|
class: "flex items-start gap-2"
|
|
4870
|
-
}, [c("span",
|
|
5030
|
+
}, [c("span", Ss, [t.done ? (w(), a(M(ge), {
|
|
4871
5031
|
key: 0,
|
|
4872
5032
|
class: "size-4 text-green",
|
|
4873
5033
|
"aria-hidden": "true"
|
|
@@ -4875,11 +5035,11 @@ var ko = [
|
|
|
4875
5035
|
key: 1,
|
|
4876
5036
|
class: y(M(X)("size-4", e.invalid ? "text-red" : "text-black/40")),
|
|
4877
5037
|
"aria-hidden": "true"
|
|
4878
|
-
}, null, 8, ["class"]))]), c("span", { class: y(t.done ? "text-black" : "text-black/65") }, [u(j(t.label), 1), c("span",
|
|
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));
|
|
4879
5039
|
}
|
|
4880
5040
|
});
|
|
4881
5041
|
// src/lib/dates.ts
|
|
4882
|
-
function
|
|
5042
|
+
function Ts(e) {
|
|
4883
5043
|
if (e instanceof Date) return e;
|
|
4884
5044
|
if (typeof e == "string" && /^\d{4}-\d{2}-\d{2}$/.test(e)) {
|
|
4885
5045
|
let [t, n, r] = e.split("-").map(Number);
|
|
@@ -4887,59 +5047,59 @@ function ps(e) {
|
|
|
4887
5047
|
}
|
|
4888
5048
|
return new Date(e);
|
|
4889
5049
|
}
|
|
4890
|
-
var
|
|
5050
|
+
var Es = [
|
|
4891
5051
|
["year", 31536e3],
|
|
4892
5052
|
["month", 2592e3],
|
|
4893
5053
|
["week", 604800],
|
|
4894
5054
|
["day", 86400],
|
|
4895
5055
|
["hour", 3600],
|
|
4896
5056
|
["minute", 60]
|
|
4897
|
-
],
|
|
4898
|
-
function
|
|
4899
|
-
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);
|
|
4900
5060
|
if (Math.abs(n) < 60) return "Just now";
|
|
4901
|
-
for (let [e, t] of
|
|
4902
|
-
let r =
|
|
5061
|
+
for (let [e, t] of Es) if (Math.abs(n) >= t) {
|
|
5062
|
+
let r = Ds.format(Math.trunc(n / t), e);
|
|
4903
5063
|
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
4904
5064
|
}
|
|
4905
5065
|
return "Just now";
|
|
4906
5066
|
}
|
|
4907
|
-
function
|
|
4908
|
-
let t =
|
|
5067
|
+
function ks(e) {
|
|
5068
|
+
let t = Ts(e), n = t.toLocaleDateString("en-GB", { weekday: "long" }), r = t.toLocaleTimeString("en-GB", {
|
|
4909
5069
|
hour: "2-digit",
|
|
4910
5070
|
minute: "2-digit"
|
|
4911
5071
|
});
|
|
4912
|
-
return `${n} ${
|
|
5072
|
+
return `${n} ${As(t)} at ${r}`;
|
|
4913
5073
|
}
|
|
4914
|
-
function
|
|
4915
|
-
return
|
|
5074
|
+
function As(e) {
|
|
5075
|
+
return Ts(e).toLocaleDateString("en-GB", {
|
|
4916
5076
|
day: "numeric",
|
|
4917
5077
|
month: "long",
|
|
4918
5078
|
year: "numeric"
|
|
4919
5079
|
});
|
|
4920
5080
|
}
|
|
4921
|
-
function
|
|
4922
|
-
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();
|
|
4923
5083
|
return (i < 0 || i === 0 && t.getDate() < n.getDate()) && r--, r;
|
|
4924
5084
|
}
|
|
4925
|
-
function
|
|
4926
|
-
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) => {
|
|
4927
5087
|
let t = new Date(e, n.getMonth(), n.getDate());
|
|
4928
5088
|
return t.getMonth() === n.getMonth() ? t : new Date(e, 2, 1);
|
|
4929
5089
|
}, a = i(r.getFullYear());
|
|
4930
5090
|
return a < r && (a = i(r.getFullYear() + 1)), Math.round((a.getTime() - r.getTime()) / 864e5);
|
|
4931
5091
|
}
|
|
4932
5092
|
// src/lib/useNow.ts
|
|
4933
|
-
var
|
|
4934
|
-
function
|
|
5093
|
+
var Ns = E(/* @__PURE__ */ new Date()), Ps = 0, Fs;
|
|
5094
|
+
function Is() {
|
|
4935
5095
|
return C(() => {
|
|
4936
|
-
|
|
5096
|
+
Ps++ === 0 && (Ns.value = /* @__PURE__ */ new Date(), Fs = setInterval(() => Ns.value = /* @__PURE__ */ new Date(), 3e4));
|
|
4937
5097
|
}), S(() => {
|
|
4938
|
-
--
|
|
4939
|
-
}),
|
|
5098
|
+
--Ps === 0 && clearInterval(Fs);
|
|
5099
|
+
}), Ns;
|
|
4940
5100
|
}
|
|
4941
5101
|
// src/components/RelativeTime/RelativeTime.vue?vue&type=script&setup=true&lang.ts
|
|
4942
|
-
var
|
|
5102
|
+
var Ls = ["datetime"], Rs = /* @__PURE__ */ f({
|
|
4943
5103
|
__name: "RelativeTime",
|
|
4944
5104
|
props: {
|
|
4945
5105
|
date: {},
|
|
@@ -4954,17 +5114,17 @@ var Ts = ["datetime"], Es = /* @__PURE__ */ f({
|
|
|
4954
5114
|
] }
|
|
4955
5115
|
},
|
|
4956
5116
|
setup(e) {
|
|
4957
|
-
let t = e, n =
|
|
4958
|
-
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 }, {
|
|
4959
5119
|
default: V(() => [c("time", {
|
|
4960
5120
|
datetime: r.value.toISOString(),
|
|
4961
5121
|
tabindex: "0",
|
|
4962
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))
|
|
4963
|
-
}, j(o.value), 11,
|
|
5123
|
+
}, j(o.value), 11, Ls)]),
|
|
4964
5124
|
_: 1
|
|
4965
5125
|
}, 8, ["text"]));
|
|
4966
5126
|
}
|
|
4967
|
-
}),
|
|
5127
|
+
}), zs = ["data-birth-date"], Bs = /* @__PURE__ */ f({
|
|
4968
5128
|
__name: "Age",
|
|
4969
5129
|
props: {
|
|
4970
5130
|
birthDate: {},
|
|
@@ -4979,23 +5139,23 @@ var Ts = ["datetime"], Es = /* @__PURE__ */ f({
|
|
|
4979
5139
|
] }
|
|
4980
5140
|
},
|
|
4981
5141
|
setup(e) {
|
|
4982
|
-
let { t } = K(), r = e, l =
|
|
4983
|
-
let e =
|
|
4984
|
-
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}`;
|
|
4985
5145
|
}), h = i(() => {
|
|
4986
5146
|
let e = d.value;
|
|
4987
5147
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
4988
5148
|
});
|
|
4989
|
-
return (t, i) => (w(), a(
|
|
5149
|
+
return (t, i) => (w(), a(La, { text: m.value }, {
|
|
4990
5150
|
default: V(() => [c("span", {
|
|
4991
5151
|
tabindex: "0",
|
|
4992
5152
|
"data-birth-date": h.value,
|
|
4993
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))
|
|
4994
|
-
}, [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)]),
|
|
4995
5155
|
_: 1
|
|
4996
5156
|
}, 8, ["text"]));
|
|
4997
5157
|
}
|
|
4998
|
-
}),
|
|
5158
|
+
}), Vs = /* @__PURE__ */ f({
|
|
4999
5159
|
__name: "Link",
|
|
5000
5160
|
props: {
|
|
5001
5161
|
href: {},
|
|
@@ -5042,10 +5202,10 @@ var Ts = ["datetime"], Es = /* @__PURE__ */ f({
|
|
|
5042
5202
|
"class"
|
|
5043
5203
|
]));
|
|
5044
5204
|
}
|
|
5045
|
-
}),
|
|
5205
|
+
}), Hs = {
|
|
5046
5206
|
class: "text-sm text-black/65",
|
|
5047
5207
|
"aria-live": "polite"
|
|
5048
|
-
},
|
|
5208
|
+
}, Us = { class: "text-black" }, Ws = /* @__PURE__ */ f({
|
|
5049
5209
|
__name: "Steps",
|
|
5050
5210
|
props: {
|
|
5051
5211
|
steps: {},
|
|
@@ -5061,14 +5221,14 @@ var Ts = ["datetime"], Es = /* @__PURE__ */ f({
|
|
|
5061
5221
|
},
|
|
5062
5222
|
setup(e) {
|
|
5063
5223
|
let t = e;
|
|
5064
|
-
return (n, r) => (w(), s("div", { class: y(M(X)("flex flex-col gap-3", t.class)) }, [c("p",
|
|
5224
|
+
return (n, r) => (w(), s("div", { class: y(M(X)("flex flex-col gap-3", t.class)) }, [c("p", Hs, [d(M(W), {
|
|
5065
5225
|
keypath: "ui.steps.stepOfNamed",
|
|
5066
5226
|
scope: "global",
|
|
5067
5227
|
tag: "span"
|
|
5068
5228
|
}, {
|
|
5069
5229
|
current: V(() => [u(j(e.step + 1), 1)]),
|
|
5070
5230
|
total: V(() => [u(j(e.steps.length), 1)]),
|
|
5071
|
-
name: V(() => [c("span",
|
|
5231
|
+
name: V(() => [c("span", Us, j(e.steps[e.step]), 1)]),
|
|
5072
5232
|
_: 1
|
|
5073
5233
|
})]), d(Lr, {
|
|
5074
5234
|
label: e.label,
|
|
@@ -5081,7 +5241,7 @@ var Ts = ["datetime"], Es = /* @__PURE__ */ f({
|
|
|
5081
5241
|
"max"
|
|
5082
5242
|
])], 2));
|
|
5083
5243
|
}
|
|
5084
|
-
}),
|
|
5244
|
+
}), Gs = /* @__PURE__ */ f({
|
|
5085
5245
|
__name: "Tabs",
|
|
5086
5246
|
props: /*@__PURE__*/ g({
|
|
5087
5247
|
tabs: {},
|
|
@@ -5143,11 +5303,11 @@ var Ts = ["datetime"], Es = /* @__PURE__ */ f({
|
|
|
5143
5303
|
_: 3
|
|
5144
5304
|
}, 8, ["model-value", "class"]));
|
|
5145
5305
|
}
|
|
5146
|
-
}),
|
|
5147
|
-
function
|
|
5306
|
+
}), Ks = 0, qs = () => `notification-${Date.now().toString(36)}-${(Ks++).toString(36)}`;
|
|
5307
|
+
function Js(e, t) {
|
|
5148
5308
|
return t === void 0 ? e.type === "error" ? Infinity : e.action ? e.compact ? 1e4 : Infinity : 6e3 : t;
|
|
5149
5309
|
}
|
|
5150
|
-
function
|
|
5310
|
+
function Ys(e = []) {
|
|
5151
5311
|
let t = T({
|
|
5152
5312
|
items: e.map(n).sort((e, t) => t.createdAt.getTime() - e.createdAt.getTime()),
|
|
5153
5313
|
toasts: [],
|
|
@@ -5157,7 +5317,7 @@ function Ls(e = []) {
|
|
|
5157
5317
|
function n(e) {
|
|
5158
5318
|
return {
|
|
5159
5319
|
...e,
|
|
5160
|
-
id: e.id ??
|
|
5320
|
+
id: e.id ?? qs(),
|
|
5161
5321
|
type: e.type ?? "info",
|
|
5162
5322
|
createdAt: e.createdAt ?? /* @__PURE__ */ new Date(),
|
|
5163
5323
|
read: e.read ?? !1
|
|
@@ -5167,7 +5327,7 @@ function Ls(e = []) {
|
|
|
5167
5327
|
let i = n(e);
|
|
5168
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), {
|
|
5169
5329
|
id: i.id,
|
|
5170
|
-
duration:
|
|
5330
|
+
duration: Js(i, r.duration),
|
|
5171
5331
|
item: i
|
|
5172
5332
|
}]), i.id;
|
|
5173
5333
|
}
|
|
@@ -5216,25 +5376,25 @@ function Ls(e = []) {
|
|
|
5216
5376
|
markAllRead: c
|
|
5217
5377
|
};
|
|
5218
5378
|
}
|
|
5219
|
-
var
|
|
5220
|
-
function
|
|
5221
|
-
return
|
|
5379
|
+
var Xs;
|
|
5380
|
+
function Zs() {
|
|
5381
|
+
return Xs ??= Ys();
|
|
5222
5382
|
}
|
|
5223
5383
|
// src/components/Notification/Notification.vue?vue&type=script&setup=true&lang.ts
|
|
5224
|
-
var
|
|
5384
|
+
var Qs = { class: "sr-only" }, $s = {
|
|
5225
5385
|
key: 0,
|
|
5226
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"
|
|
5227
|
-
},
|
|
5387
|
+
}, ec = {
|
|
5228
5388
|
key: 1,
|
|
5229
5389
|
class: "flex items-center gap-1.5 text-xs text-black/65"
|
|
5230
|
-
},
|
|
5390
|
+
}, tc = {
|
|
5231
5391
|
key: 0,
|
|
5232
5392
|
class: "size-2 shrink-0 rounded-full bg-primary",
|
|
5233
5393
|
"aria-hidden": "true"
|
|
5234
|
-
},
|
|
5394
|
+
}, nc = {
|
|
5235
5395
|
key: 1,
|
|
5236
5396
|
class: "sr-only"
|
|
5237
|
-
},
|
|
5397
|
+
}, rc = ["href"], ic = /* @__PURE__ */ f({
|
|
5238
5398
|
__name: "Notification",
|
|
5239
5399
|
props: {
|
|
5240
5400
|
type: { default: "info" },
|
|
@@ -5299,12 +5459,12 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5299
5459
|
c("p", {
|
|
5300
5460
|
id: f,
|
|
5301
5461
|
class: y(M(X)("font-bold", h.value && "min-w-0 flex-1 py-1"))
|
|
5302
|
-
}, [c("span",
|
|
5303
|
-
!h.value && (e.description || t.$slots.default) ? (w(), s("div",
|
|
5304
|
-
e.appearance === "row" && (e.createdAt || e.unread) ? (w(), s("p",
|
|
5305
|
-
e.unread ? (w(), s("span",
|
|
5306
|
-
e.unread ? (w(), s("span",
|
|
5307
|
-
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, {
|
|
5308
5468
|
key: 2,
|
|
5309
5469
|
date: e.createdAt,
|
|
5310
5470
|
now: e.now
|
|
@@ -5319,7 +5479,7 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5319
5479
|
"as-child": "",
|
|
5320
5480
|
onClick: g
|
|
5321
5481
|
}, {
|
|
5322
|
-
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)]),
|
|
5323
5483
|
_: 1
|
|
5324
5484
|
})) : e.action ? (w(), a(Z, {
|
|
5325
5485
|
key: 1,
|
|
@@ -5345,11 +5505,11 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5345
5505
|
}, 8, ["class", "aria-label"])) : o("", !0)
|
|
5346
5506
|
], 2));
|
|
5347
5507
|
}
|
|
5348
|
-
}),
|
|
5508
|
+
}), ac = {
|
|
5349
5509
|
key: 0,
|
|
5350
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",
|
|
5351
5511
|
"aria-hidden": "true"
|
|
5352
|
-
},
|
|
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({
|
|
5353
5513
|
__name: "NotificationPane",
|
|
5354
5514
|
props: /*@__PURE__*/ g({
|
|
5355
5515
|
notifications: {},
|
|
@@ -5365,7 +5525,7 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5365
5525
|
}),
|
|
5366
5526
|
emits: ["update:open"],
|
|
5367
5527
|
setup(e) {
|
|
5368
|
-
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", {
|
|
5369
5529
|
label: g.value,
|
|
5370
5530
|
count: h.value
|
|
5371
5531
|
}) : g.value), b = `${P()}-heading`, x = E(), S = E();
|
|
@@ -5415,7 +5575,7 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5415
5575
|
ref: C,
|
|
5416
5576
|
"aria-labelledby": b,
|
|
5417
5577
|
class: "flex min-h-0 flex-col"
|
|
5418
|
-
}, [c("div",
|
|
5578
|
+
}, [c("div", oc, [c("h2", {
|
|
5419
5579
|
id: b,
|
|
5420
5580
|
ref_key: "heading",
|
|
5421
5581
|
ref: x,
|
|
@@ -5440,7 +5600,7 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5440
5600
|
}, [(w(!0), s(n, null, D(p.value, (e, t) => (w(), s("li", {
|
|
5441
5601
|
key: e.id,
|
|
5442
5602
|
class: "border-b border-black/15 last:border-b-0"
|
|
5443
|
-
}, [d(
|
|
5603
|
+
}, [d(ic, {
|
|
5444
5604
|
appearance: "row",
|
|
5445
5605
|
type: e.type,
|
|
5446
5606
|
title: e.title,
|
|
@@ -5459,7 +5619,7 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5459
5619
|
"unread",
|
|
5460
5620
|
"onDismiss",
|
|
5461
5621
|
"onAction"
|
|
5462
|
-
])]))), 128))], 42,
|
|
5622
|
+
])]))), 128))], 42, sc)) : (w(), a(Io, {
|
|
5463
5623
|
key: 1,
|
|
5464
5624
|
size: "sm",
|
|
5465
5625
|
icon: M(oe),
|
|
@@ -5478,13 +5638,13 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5478
5638
|
"aria-label": _.value,
|
|
5479
5639
|
class: y(M(X)("relative overflow-visible", e.ui?.trigger))
|
|
5480
5640
|
}, {
|
|
5481
|
-
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)]),
|
|
5482
5642
|
_: 1
|
|
5483
5643
|
}, 8, ["aria-label", "class"])]),
|
|
5484
5644
|
_: 1
|
|
5485
5645
|
}, 8, ["open", "ui"]));
|
|
5486
5646
|
}
|
|
5487
|
-
}),
|
|
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({
|
|
5488
5648
|
__name: "Toaster",
|
|
5489
5649
|
props: {
|
|
5490
5650
|
notifications: {},
|
|
@@ -5501,15 +5661,15 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5501
5661
|
},
|
|
5502
5662
|
emits: ["more"],
|
|
5503
5663
|
setup(e, { emit: t }) {
|
|
5504
|
-
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;
|
|
5505
5665
|
C(() => window.addEventListener("resize", g)), S(() => window.removeEventListener("resize", g));
|
|
5506
|
-
let _ = i(() => Math.max(h.value -
|
|
5507
|
-
let e = p.value.toasts.slice(-l.limit).reverse(), t = (e) => L.get(e.id) ?? b(e.item), n = e.filter((e) => !W.has(e.id)), r = n.reduce((e, n) => e + t(n) +
|
|
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();
|
|
5508
5668
|
if (r <= _.value) n.forEach((e) => i.add(e.id));
|
|
5509
5669
|
else {
|
|
5510
5670
|
let e = 44;
|
|
5511
5671
|
for (let r of n) {
|
|
5512
|
-
let n = e + t(r) + (i.size ?
|
|
5672
|
+
let n = e + t(r) + (i.size ? fc : 0);
|
|
5513
5673
|
if (i.size && n > _.value) break;
|
|
5514
5674
|
i.add(r.id), e = n;
|
|
5515
5675
|
}
|
|
@@ -5534,7 +5694,7 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5534
5694
|
z(() => p.value.paneOpen, (e) => {
|
|
5535
5695
|
if (!e) return;
|
|
5536
5696
|
let t = new Set(k.value.map((e) => e.id));
|
|
5537
|
-
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);
|
|
5538
5698
|
});
|
|
5539
5699
|
function I() {
|
|
5540
5700
|
p.value.openPane(), f("more");
|
|
@@ -5557,23 +5717,23 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5557
5717
|
})));
|
|
5558
5718
|
}
|
|
5559
5719
|
let W = T(/* @__PURE__ */ new Set()), G = /* @__PURE__ */ new Map();
|
|
5560
|
-
function
|
|
5720
|
+
function q(e, t) {
|
|
5561
5721
|
t || W.has(e) || (W.add(e), setTimeout(() => {
|
|
5562
5722
|
p.value.hideToast(e), W.delete(e), U.delete(e), G.delete(e), L.delete(e);
|
|
5563
5723
|
}, 200));
|
|
5564
5724
|
}
|
|
5565
|
-
let
|
|
5725
|
+
let J = i(() => {
|
|
5566
5726
|
let e = k.value.filter((e) => !W.has(e.id)), t = /* @__PURE__ */ new Map(), n = [], r = 0;
|
|
5567
|
-
for (let t of e) n.push(r), r += (L.get(t.id) ?? 0) +
|
|
5568
|
-
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;
|
|
5569
5729
|
for (; o < e.length && (o === 0 || n[o] + (L.get(e[o].id) ?? 0) <= a);) o++;
|
|
5570
|
-
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;
|
|
5571
5731
|
e.forEach((r, i) => {
|
|
5572
5732
|
let a = i >= o;
|
|
5573
5733
|
t.set(r.id, {
|
|
5574
5734
|
spread: n[i],
|
|
5575
5735
|
stacked: a ? d : n[i],
|
|
5576
|
-
scale: a ?
|
|
5736
|
+
scale: a ? pc : 1,
|
|
5577
5737
|
opacity: +!a,
|
|
5578
5738
|
z: e.length - i
|
|
5579
5739
|
});
|
|
@@ -5584,19 +5744,19 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5584
5744
|
places: t,
|
|
5585
5745
|
spreadHeight: i + (A.value > 0 ? 44 : 0),
|
|
5586
5746
|
stackedHeight: p,
|
|
5587
|
-
moreOffset: i + (i ?
|
|
5747
|
+
moreOffset: i + (i ? fc : 0),
|
|
5588
5748
|
notInView: f,
|
|
5589
5749
|
pillOffset: d
|
|
5590
5750
|
};
|
|
5591
5751
|
});
|
|
5592
|
-
function
|
|
5593
|
-
let t = W.has(e) ? G.get(e) :
|
|
5594
|
-
"--toast-spread": r(
|
|
5595
|
-
"--toast-stacked": r(
|
|
5596
|
-
"--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,
|
|
5597
5757
|
"--toast-opacity": 0,
|
|
5598
5758
|
"--toast-spread-opacity": 0,
|
|
5599
|
-
"--toast-spread-scale":
|
|
5759
|
+
"--toast-spread-scale": pc,
|
|
5600
5760
|
"--toast-z": 0
|
|
5601
5761
|
};
|
|
5602
5762
|
if (!t && N.has(e) || t && !U.has(e) && P.has(e)) return i;
|
|
@@ -5622,9 +5782,9 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5622
5782
|
"--toast-z": t.z
|
|
5623
5783
|
};
|
|
5624
5784
|
}
|
|
5625
|
-
let
|
|
5626
|
-
"--toast-more": `${
|
|
5627
|
-
"--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`
|
|
5628
5788
|
}));
|
|
5629
5789
|
function ie(e) {
|
|
5630
5790
|
e.currentTarget.closest("[data-expanded]") ? I() : ae();
|
|
@@ -5634,8 +5794,8 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5634
5794
|
(e && R.get(e.id)?.parentElement)?.focus({ focusVisible: !1 });
|
|
5635
5795
|
}
|
|
5636
5796
|
let oe = i(() => ({
|
|
5637
|
-
"--toast-stack-spread": `${
|
|
5638
|
-
"--toast-stack-stacked": `${
|
|
5797
|
+
"--toast-stack-spread": `${J.value.spreadHeight}px`,
|
|
5798
|
+
"--toast-stack-stacked": `${J.value.stackedHeight}px`
|
|
5639
5799
|
})), se = {
|
|
5640
5800
|
"bottom-right": "right-4 bottom-4 left-4 sm:left-auto sm:w-96",
|
|
5641
5801
|
"top-right": "top-16 right-4 left-4 sm:left-auto sm:w-96",
|
|
@@ -5650,11 +5810,11 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5650
5810
|
open: !W.has(e.id),
|
|
5651
5811
|
duration: e.duration,
|
|
5652
5812
|
type: e.item.type === "error" || e.item.type === "warning" ? "foreground" : "background",
|
|
5653
|
-
style: x(
|
|
5813
|
+
style: x(te(e.id)),
|
|
5654
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")),
|
|
5655
|
-
"onUpdate:open": (t) =>
|
|
5815
|
+
"onUpdate:open": (t) => q(e.id, t)
|
|
5656
5816
|
}, {
|
|
5657
|
-
default: V(() => [d(
|
|
5817
|
+
default: V(() => [d(ic, {
|
|
5658
5818
|
ref_for: !0,
|
|
5659
5819
|
ref: (t) => H(e.id, t),
|
|
5660
5820
|
type: e.item.type,
|
|
@@ -5664,8 +5824,8 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5664
5824
|
compact: e.item.compact,
|
|
5665
5825
|
class: "shadow-md",
|
|
5666
5826
|
"dismiss-label": M(r)("ui.notifications.close", { title: e.item.title }),
|
|
5667
|
-
onDismiss: (t) =>
|
|
5668
|
-
onAction: (t) =>
|
|
5827
|
+
onDismiss: (t) => q(e.id, !1),
|
|
5828
|
+
onAction: (t) => q(e.id, !1)
|
|
5669
5829
|
}, null, 8, [
|
|
5670
5830
|
"type",
|
|
5671
5831
|
"title",
|
|
@@ -5689,15 +5849,15 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5689
5849
|
style: x(oe.value),
|
|
5690
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))
|
|
5691
5851
|
}, {
|
|
5692
|
-
default: V(() => [
|
|
5852
|
+
default: V(() => [J.value.notInView ? (w(), s("li", {
|
|
5693
5853
|
key: 0,
|
|
5694
|
-
style: x(
|
|
5854
|
+
style: x(re.value),
|
|
5695
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"))
|
|
5696
5856
|
}, [c("button", {
|
|
5697
5857
|
type: "button",
|
|
5698
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")),
|
|
5699
5859
|
onClick: ie
|
|
5700
|
-
}, [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)]),
|
|
5701
5861
|
_: 1
|
|
5702
5862
|
}, 8, [
|
|
5703
5863
|
"label",
|
|
@@ -5707,7 +5867,69 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5707
5867
|
_: 1
|
|
5708
5868
|
}, 8, ["label"]));
|
|
5709
5869
|
}
|
|
5710
|
-
}),
|
|
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: {
|
|
5711
5933
|
age: {
|
|
5712
5934
|
born: "Born {date}",
|
|
5713
5935
|
birthdayToday: "Birthday today",
|
|
@@ -5738,6 +5960,7 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5738
5960
|
chooseMonth: "Choose month",
|
|
5739
5961
|
chooseYear: "Choose year"
|
|
5740
5962
|
},
|
|
5963
|
+
changeIndicator: { changed: "Changed from {from} to {to}" },
|
|
5741
5964
|
chip: { remove: "Remove" },
|
|
5742
5965
|
formField: { about: "About {label}" },
|
|
5743
5966
|
header: {
|
|
@@ -5822,17 +6045,22 @@ var Bs = { class: "sr-only" }, Vs = {
|
|
|
5822
6045
|
selectAll: "Select all rows",
|
|
5823
6046
|
selectRow: "Select row {n}",
|
|
5824
6047
|
select: "Select"
|
|
6048
|
+
},
|
|
6049
|
+
unsavedChangesBar: {
|
|
6050
|
+
message: "Unsaved changes",
|
|
6051
|
+
discard: "Discard",
|
|
6052
|
+
save: "Save"
|
|
5825
6053
|
}
|
|
5826
|
-
} },
|
|
5827
|
-
function
|
|
5828
|
-
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 = {};
|
|
5829
6057
|
for (let e of i) a[e] = {
|
|
5830
|
-
...
|
|
6058
|
+
...Cc[e],
|
|
5831
6059
|
...t[e]
|
|
5832
6060
|
};
|
|
5833
6061
|
let o = G({
|
|
5834
6062
|
legacy: !1,
|
|
5835
|
-
locale: e.locale ??
|
|
6063
|
+
locale: e.locale ?? Tc(i, n, r),
|
|
5836
6064
|
fallbackLocale: n,
|
|
5837
6065
|
messages: a
|
|
5838
6066
|
});
|
|
@@ -5843,7 +6071,7 @@ function oc(e = {}) {
|
|
|
5843
6071
|
typeof document < "u" && (document.documentElement.lang = e);
|
|
5844
6072
|
}, { immediate: !0 }), o;
|
|
5845
6073
|
}
|
|
5846
|
-
function
|
|
6074
|
+
function Tc(e, t, n) {
|
|
5847
6075
|
try {
|
|
5848
6076
|
let t = localStorage.getItem(n);
|
|
5849
6077
|
if (t && e.includes(t)) return t;
|
|
@@ -5854,4 +6082,4 @@ function sc(e, t, n) {
|
|
|
5854
6082
|
}
|
|
5855
6083
|
return t;
|
|
5856
6084
|
}
|
|
5857
|
-
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 };
|