@leonardaustin/ui 0.7.0 → 0.8.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/ui/Alert.d.ts +7 -3
- package/dist/components/ui/Alert.d.ts.map +1 -1
- package/dist/components/ui/Badge.d.ts +1 -1
- package/dist/components/ui/Badge.d.ts.map +1 -1
- package/dist/components/ui/Button.d.ts.map +1 -1
- package/dist/components/ui/Card.d.ts.map +1 -1
- package/dist/components/ui/Dialog.d.ts +38 -4
- package/dist/components/ui/Dialog.d.ts.map +1 -1
- package/dist/components/ui/DialogActions.d.ts +14 -8
- package/dist/components/ui/DialogActions.d.ts.map +1 -1
- package/dist/components/ui/SideSheet.d.ts.map +1 -1
- package/dist/hooks/useDropUp.d.ts.map +1 -1
- package/dist/index.js +923 -730
- package/dist/lib/anchorPlacement.d.ts +44 -0
- package/dist/lib/anchorPlacement.d.ts.map +1 -0
- package/dist/lib/dialogDrag.d.ts +20 -11
- package/dist/lib/dialogDrag.d.ts.map +1 -1
- package/dist/lib/rect.d.ts +8 -0
- package/dist/lib/rect.d.ts.map +1 -0
- package/dist/styles.css +135 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2632,6 +2632,9 @@ var on = {
|
|
|
2632
2632
|
return /* @__PURE__ */ v("button", {
|
|
2633
2633
|
ref: u,
|
|
2634
2634
|
"data-control-size": d,
|
|
2635
|
+
"data-variant": e,
|
|
2636
|
+
"data-size": t,
|
|
2637
|
+
"data-hide-label": p && !f ? "" : void 0,
|
|
2635
2638
|
disabled: c || r,
|
|
2636
2639
|
className: G("ui-sized-control inline-flex items-center justify-center rounded-md font-medium", "font-control", "transition-colors duration-[100ms] ease-out", "cursor-pointer", "disabled:cursor-not-allowed disabled:opacity-40", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", on[e], f ? cn[t] : sn[t], p && !f && dn[p]?.[t], o),
|
|
2637
2640
|
...l,
|
|
@@ -2655,19 +2658,69 @@ function pn({ children: e, as: t = "h2", className: n, border: r = !0 }) {
|
|
|
2655
2658
|
});
|
|
2656
2659
|
}
|
|
2657
2660
|
//#endregion
|
|
2661
|
+
//#region src/lib/anchorPlacement.ts
|
|
2662
|
+
var mn = {
|
|
2663
|
+
top: "bottom",
|
|
2664
|
+
bottom: "top",
|
|
2665
|
+
left: "right",
|
|
2666
|
+
right: "left"
|
|
2667
|
+
}, hn = [
|
|
2668
|
+
"bottom",
|
|
2669
|
+
"top",
|
|
2670
|
+
"right",
|
|
2671
|
+
"left"
|
|
2672
|
+
];
|
|
2673
|
+
function gn(e, t, n) {
|
|
2674
|
+
switch (n) {
|
|
2675
|
+
case "top": return e.top - t.top;
|
|
2676
|
+
case "bottom": return t.bottom - e.bottom;
|
|
2677
|
+
case "left": return e.left - t.left;
|
|
2678
|
+
case "right": return t.right - e.right;
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2681
|
+
function _n(e, t, n, r) {
|
|
2682
|
+
return Math.min(Math.max(e, n), r - t);
|
|
2683
|
+
}
|
|
2684
|
+
function vn(e, t, { size: { width: n, height: r }, bounds: i, margin: a, gap: o }) {
|
|
2685
|
+
let s = i.left + a, c = i.right - a, l = i.top + a, u = i.bottom - a;
|
|
2686
|
+
if (n > c - s || r > u - l) return null;
|
|
2687
|
+
let d, f;
|
|
2688
|
+
return e === "top" || e === "bottom" ? (d = _n((t.left + t.right) / 2 - n / 2, n, s, c), f = e === "bottom" ? t.bottom + o : t.top - o - r) : (d = e === "right" ? t.right + o : t.left - o - n, f = _n((t.top + t.bottom) / 2 - r / 2, r, l, u)), d >= s && d + n <= c && f >= l && f + r <= u ? {
|
|
2689
|
+
side: e,
|
|
2690
|
+
left: d,
|
|
2691
|
+
top: f
|
|
2692
|
+
} : null;
|
|
2693
|
+
}
|
|
2694
|
+
function yn(e, t, n) {
|
|
2695
|
+
if (!t) return null;
|
|
2696
|
+
let { bounds: r } = n;
|
|
2697
|
+
if (!(t.right > r.left && t.left < r.right && t.bottom > r.top && t.top < r.bottom)) return null;
|
|
2698
|
+
let i = e === "auto" ? [...hn].sort((e, n) => gn(t, r, n) - gn(t, r, e)) : [e, mn[e]];
|
|
2699
|
+
for (let e of i) {
|
|
2700
|
+
let r = vn(e, t, n);
|
|
2701
|
+
if (r) return r;
|
|
2702
|
+
}
|
|
2703
|
+
return null;
|
|
2704
|
+
}
|
|
2705
|
+
//#endregion
|
|
2658
2706
|
//#region src/hooks/useDropUp.ts
|
|
2659
|
-
function
|
|
2707
|
+
function bn(e, t, n) {
|
|
2660
2708
|
let [r, i] = h(!1);
|
|
2661
2709
|
return f(() => {
|
|
2662
2710
|
if (!e || !n.current || !t.current) return;
|
|
2663
2711
|
let r = t.current.getBoundingClientRect(), a = n.current.getBoundingClientRect();
|
|
2664
|
-
i(
|
|
2712
|
+
i(gn(r, {
|
|
2713
|
+
left: 0,
|
|
2714
|
+
top: 0,
|
|
2715
|
+
right: window.innerWidth,
|
|
2716
|
+
bottom: window.innerHeight
|
|
2717
|
+
}, "bottom") < a.height + 8);
|
|
2665
2718
|
}, [e]), r;
|
|
2666
2719
|
}
|
|
2667
2720
|
//#endregion
|
|
2668
2721
|
//#region src/components/ui/SelectDropdown.tsx
|
|
2669
|
-
function
|
|
2670
|
-
let [c, l] = h(!1), [d, f] = h(-1), p = m(null), g = m(null), y =
|
|
2722
|
+
function xn({ options: e, value: t, onChange: n, label: r, placeholder: i = "Select...", className: a, size: o = "md" }) {
|
|
2723
|
+
let [c, l] = h(!1), [d, f] = h(-1), p = m(null), g = m(null), y = bn(c, p, g), b = u(), x = `${b}-listbox`, S = e.find((e) => e.value === t);
|
|
2671
2724
|
jt(c, s(() => l(!1), []), [p]);
|
|
2672
2725
|
function C() {
|
|
2673
2726
|
if (!c) {
|
|
@@ -2704,7 +2757,7 @@ function hn({ options: e, value: t, onChange: n, label: r, placeholder: i = "Sel
|
|
|
2704
2757
|
className: G("flex flex-col gap-1.5", a),
|
|
2705
2758
|
ref: p,
|
|
2706
2759
|
children: [r && /* @__PURE__ */ _("span", {
|
|
2707
|
-
className: "
|
|
2760
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
2708
2761
|
children: r
|
|
2709
2762
|
}), /* @__PURE__ */ v("div", {
|
|
2710
2763
|
className: "relative",
|
|
@@ -2753,14 +2806,14 @@ function hn({ options: e, value: t, onChange: n, label: r, placeholder: i = "Sel
|
|
|
2753
2806
|
}
|
|
2754
2807
|
//#endregion
|
|
2755
2808
|
//#region src/components/ui/Slider.tsx
|
|
2756
|
-
function
|
|
2809
|
+
function Sn({ min: e, max: t, step: n = 1, value: r, onChange: i, onCommit: a, label: o, showValue: s, className: c }) {
|
|
2757
2810
|
let l = (r - e) / (t - e) * 100;
|
|
2758
2811
|
return /* @__PURE__ */ v("div", {
|
|
2759
2812
|
className: G("flex flex-col gap-1.5", c),
|
|
2760
2813
|
children: [(o || s) && /* @__PURE__ */ v("div", {
|
|
2761
2814
|
className: "flex items-center justify-between",
|
|
2762
2815
|
children: [o && /* @__PURE__ */ _("span", {
|
|
2763
|
-
className: "
|
|
2816
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
2764
2817
|
children: o
|
|
2765
2818
|
}), s && /* @__PURE__ */ _("span", {
|
|
2766
2819
|
className: "text-text-primary font-data text-xs",
|
|
@@ -2781,7 +2834,7 @@ function gn({ min: e, max: t, step: n = 1, value: r, onChange: i, onCommit: a, l
|
|
|
2781
2834
|
}
|
|
2782
2835
|
//#endregion
|
|
2783
2836
|
//#region src/components/ui/ThemePreview.tsx
|
|
2784
|
-
function
|
|
2837
|
+
function Cn({ label: e, active: t, icon: n, preview: r, onClick: i, className: a }) {
|
|
2785
2838
|
return /* @__PURE__ */ v("button", {
|
|
2786
2839
|
type: "button",
|
|
2787
2840
|
onClick: i,
|
|
@@ -2804,7 +2857,7 @@ function _n({ label: e, active: t, icon: n, preview: r, onClick: i, className: a
|
|
|
2804
2857
|
}
|
|
2805
2858
|
//#endregion
|
|
2806
2859
|
//#region src/components/ui/Toggle.tsx
|
|
2807
|
-
function
|
|
2860
|
+
function wn({ checked: e, onChange: t, disabled: n, label: r, className: i }) {
|
|
2808
2861
|
return /* @__PURE__ */ v("label", {
|
|
2809
2862
|
className: G("flex w-fit items-center", n ? "cursor-not-allowed opacity-40" : "cursor-pointer", i),
|
|
2810
2863
|
style: { gap: 10 },
|
|
@@ -2814,13 +2867,13 @@ function vn({ checked: e, onChange: t, disabled: n, label: r, className: i }) {
|
|
|
2814
2867
|
"aria-checked": e,
|
|
2815
2868
|
disabled: n,
|
|
2816
2869
|
onClick: () => t(!e),
|
|
2817
|
-
className: G("relative shrink-0 rounded-full border transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", e ? "bg-accent border-accent" : "bg-bg-tertiary
|
|
2870
|
+
className: G("relative shrink-0 rounded-full border transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", e ? "bg-accent border-accent" : "bg-bg-tertiary ui-switch-off", !n && "cursor-pointer"),
|
|
2818
2871
|
style: {
|
|
2819
2872
|
width: 36,
|
|
2820
2873
|
height: 20
|
|
2821
2874
|
},
|
|
2822
2875
|
children: /* @__PURE__ */ _("span", {
|
|
2823
|
-
className: "
|
|
2876
|
+
className: "ui-switch-knob absolute top-1/2 rounded-full transition-[left] duration-[100ms]",
|
|
2824
2877
|
style: {
|
|
2825
2878
|
width: 14,
|
|
2826
2879
|
height: 14,
|
|
@@ -2837,13 +2890,13 @@ function vn({ checked: e, onChange: t, disabled: n, label: r, className: i }) {
|
|
|
2837
2890
|
}
|
|
2838
2891
|
//#endregion
|
|
2839
2892
|
//#region src/components/app-shell/themeMenuEvents.ts
|
|
2840
|
-
var
|
|
2841
|
-
function
|
|
2893
|
+
var Tn = "open-theme-menu";
|
|
2894
|
+
function En(e = Tn) {
|
|
2842
2895
|
typeof document > "u" || document.dispatchEvent(new CustomEvent(e));
|
|
2843
2896
|
}
|
|
2844
2897
|
//#endregion
|
|
2845
2898
|
//#region src/components/app-shell/ThemeMenu.tsx
|
|
2846
|
-
var
|
|
2899
|
+
var Dn = [
|
|
2847
2900
|
{
|
|
2848
2901
|
value: "dark",
|
|
2849
2902
|
label: "Dark",
|
|
@@ -2860,7 +2913,7 @@ var xn = [
|
|
|
2860
2913
|
Icon: ne
|
|
2861
2914
|
}
|
|
2862
2915
|
];
|
|
2863
|
-
function
|
|
2916
|
+
function On({ className: e, respondToOpenEvent: t = !0 }) {
|
|
2864
2917
|
let [n, r] = h(!1), [i, a] = h(!1), [o, c] = h({
|
|
2865
2918
|
top: 0,
|
|
2866
2919
|
right: 0
|
|
@@ -2888,7 +2941,7 @@ function Sn({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2888
2941
|
let e = () => {
|
|
2889
2942
|
x(), r(!0), a(!0);
|
|
2890
2943
|
};
|
|
2891
|
-
return document.addEventListener(
|
|
2944
|
+
return document.addEventListener(Tn, e), () => document.removeEventListener(Tn, e);
|
|
2892
2945
|
}, [t, x]), l(() => {
|
|
2893
2946
|
if (n) return window.addEventListener("resize", x), window.addEventListener("scroll", x, !0), () => {
|
|
2894
2947
|
window.removeEventListener("resize", x), window.removeEventListener("scroll", x, !0);
|
|
@@ -2924,7 +2977,7 @@ function Sn({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2924
2977
|
children: "Mode"
|
|
2925
2978
|
}), /* @__PURE__ */ _("div", {
|
|
2926
2979
|
className: "bg-bg-secondary border-border flex gap-1 rounded-md border p-1.5",
|
|
2927
|
-
children:
|
|
2980
|
+
children: Dn.map(({ value: e, label: t, Icon: n }) => /* @__PURE__ */ v("button", {
|
|
2928
2981
|
onClick: () => w(e),
|
|
2929
2982
|
className: G("font-navigation flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded px-2 py-1 text-xs transition-colors duration-[100ms]", C === e ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
2930
2983
|
children: [/* @__PURE__ */ _(n, { className: "h-3.5 w-3.5" }), t]
|
|
@@ -2937,7 +2990,7 @@ function Sn({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2937
2990
|
children: "Dark themes"
|
|
2938
2991
|
}), /* @__PURE__ */ _("div", {
|
|
2939
2992
|
className: "grid grid-cols-2 gap-2",
|
|
2940
|
-
children: Tt.map((e) => /* @__PURE__ */ _(
|
|
2993
|
+
children: Tt.map((e) => /* @__PURE__ */ _(Cn, {
|
|
2941
2994
|
label: e.label,
|
|
2942
2995
|
icon: e.icon,
|
|
2943
2996
|
preview: e.preview,
|
|
@@ -2952,7 +3005,7 @@ function Sn({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2952
3005
|
children: "Light themes"
|
|
2953
3006
|
}), /* @__PURE__ */ _("div", {
|
|
2954
3007
|
className: "grid grid-cols-2 gap-2",
|
|
2955
|
-
children: wt.map((e) => /* @__PURE__ */ _(
|
|
3008
|
+
children: wt.map((e) => /* @__PURE__ */ _(Cn, {
|
|
2956
3009
|
label: e.label,
|
|
2957
3010
|
icon: e.icon,
|
|
2958
3011
|
preview: e.preview,
|
|
@@ -2986,28 +3039,28 @@ function Sn({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
2986
3039
|
}), /* @__PURE__ */ v("div", {
|
|
2987
3040
|
className: "grid grid-cols-2 gap-2",
|
|
2988
3041
|
children: [
|
|
2989
|
-
/* @__PURE__ */ _(
|
|
3042
|
+
/* @__PURE__ */ _(xn, {
|
|
2990
3043
|
label: "UI / Body",
|
|
2991
3044
|
size: "sm",
|
|
2992
3045
|
options: kt,
|
|
2993
3046
|
value: j,
|
|
2994
3047
|
onChange: (e) => M(e)
|
|
2995
3048
|
}),
|
|
2996
|
-
/* @__PURE__ */ _(
|
|
3049
|
+
/* @__PURE__ */ _(xn, {
|
|
2997
3050
|
label: "Headings",
|
|
2998
3051
|
size: "sm",
|
|
2999
3052
|
options: kt,
|
|
3000
3053
|
value: N,
|
|
3001
3054
|
onChange: (e) => P(e)
|
|
3002
3055
|
}),
|
|
3003
|
-
/* @__PURE__ */ _(
|
|
3056
|
+
/* @__PURE__ */ _(xn, {
|
|
3004
3057
|
label: "Prose",
|
|
3005
3058
|
size: "sm",
|
|
3006
3059
|
options: kt,
|
|
3007
3060
|
value: F,
|
|
3008
3061
|
onChange: (e) => I(e)
|
|
3009
3062
|
}),
|
|
3010
|
-
/* @__PURE__ */ _(
|
|
3063
|
+
/* @__PURE__ */ _(xn, {
|
|
3011
3064
|
label: "Code",
|
|
3012
3065
|
size: "sm",
|
|
3013
3066
|
options: kt,
|
|
@@ -3019,7 +3072,7 @@ function Sn({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
3019
3072
|
/* @__PURE__ */ v("div", {
|
|
3020
3073
|
className: "space-y-3",
|
|
3021
3074
|
children: [
|
|
3022
|
-
/* @__PURE__ */ _(
|
|
3075
|
+
/* @__PURE__ */ _(Sn, {
|
|
3023
3076
|
label: "Font size",
|
|
3024
3077
|
min: 11,
|
|
3025
3078
|
max: 18,
|
|
@@ -3027,7 +3080,7 @@ function Sn({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
3027
3080
|
onChange: A,
|
|
3028
3081
|
showValue: !0
|
|
3029
3082
|
}),
|
|
3030
|
-
/* @__PURE__ */ _(
|
|
3083
|
+
/* @__PURE__ */ _(Sn, {
|
|
3031
3084
|
label: "Corner radius",
|
|
3032
3085
|
min: 0,
|
|
3033
3086
|
max: 16,
|
|
@@ -3035,7 +3088,7 @@ function Sn({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
3035
3088
|
onChange: te,
|
|
3036
3089
|
showValue: !0
|
|
3037
3090
|
}),
|
|
3038
|
-
/* @__PURE__ */ _(
|
|
3091
|
+
/* @__PURE__ */ _(Sn, {
|
|
3039
3092
|
label: "Border width",
|
|
3040
3093
|
min: 1,
|
|
3041
3094
|
max: 3,
|
|
@@ -3043,7 +3096,7 @@ function Sn({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
3043
3096
|
onChange: re,
|
|
3044
3097
|
showValue: !0
|
|
3045
3098
|
}),
|
|
3046
|
-
/* @__PURE__ */ _(
|
|
3099
|
+
/* @__PURE__ */ _(Sn, {
|
|
3047
3100
|
label: "Letter spacing",
|
|
3048
3101
|
min: 0,
|
|
3049
3102
|
max: .3,
|
|
@@ -3052,7 +3105,7 @@ function Sn({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
3052
3105
|
onChange: ae,
|
|
3053
3106
|
showValue: !0
|
|
3054
3107
|
}),
|
|
3055
|
-
/* @__PURE__ */ _(
|
|
3108
|
+
/* @__PURE__ */ _(Sn, {
|
|
3056
3109
|
label: "Line height",
|
|
3057
3110
|
min: 1.2,
|
|
3058
3111
|
max: 2,
|
|
@@ -3061,7 +3114,7 @@ function Sn({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
3061
3114
|
onChange: oe,
|
|
3062
3115
|
showValue: !0
|
|
3063
3116
|
}),
|
|
3064
|
-
/* @__PURE__ */ _(
|
|
3117
|
+
/* @__PURE__ */ _(Sn, {
|
|
3065
3118
|
label: "Density",
|
|
3066
3119
|
min: .18,
|
|
3067
3120
|
max: .32,
|
|
@@ -3072,7 +3125,7 @@ function Sn({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
3072
3125
|
})
|
|
3073
3126
|
]
|
|
3074
3127
|
}),
|
|
3075
|
-
/* @__PURE__ */ _(
|
|
3128
|
+
/* @__PURE__ */ _(wn, {
|
|
3076
3129
|
label: "Reduced motion",
|
|
3077
3130
|
checked: V,
|
|
3078
3131
|
onChange: le
|
|
@@ -3103,25 +3156,25 @@ function Sn({ className: e, respondToOpenEvent: t = !0 }) {
|
|
|
3103
3156
|
}
|
|
3104
3157
|
//#endregion
|
|
3105
3158
|
//#region src/components/app-shell/TopBar.tsx
|
|
3106
|
-
var
|
|
3159
|
+
var kn = [
|
|
3107
3160
|
"dark",
|
|
3108
3161
|
"light",
|
|
3109
3162
|
"system"
|
|
3110
|
-
],
|
|
3163
|
+
], An = {
|
|
3111
3164
|
dark: re,
|
|
3112
3165
|
light: se,
|
|
3113
3166
|
system: ne
|
|
3114
|
-
},
|
|
3167
|
+
}, jn = {
|
|
3115
3168
|
dark: "Dark",
|
|
3116
3169
|
light: "Light",
|
|
3117
3170
|
system: "System"
|
|
3118
3171
|
};
|
|
3119
|
-
function
|
|
3172
|
+
function Mn({ onMobileMenuToggle: e, breadcrumbs: t, navItems: n = [], navLabel: r = "Primary", showCommandTrigger: i = !0, commandTriggerLabel: a = "Search", commandShortcut: o = mt, currentPath: s, onNavigate: c, onCommandTrigger: l, actions: u }) {
|
|
3120
3173
|
let { sidebarCollapsed: d, setSidebarCollapsed: f, colorMode: p, setColorMode: m } = Nt();
|
|
3121
3174
|
function h() {
|
|
3122
|
-
m(
|
|
3175
|
+
m(kn[(kn.indexOf(p) + 1) % kn.length]);
|
|
3123
3176
|
}
|
|
3124
|
-
let y =
|
|
3177
|
+
let y = An[p], b = n.length > 0;
|
|
3125
3178
|
return /* @__PURE__ */ v("header", {
|
|
3126
3179
|
className: "border-border bg-bg-secondary font-navigation flex h-9 shrink-0 items-center justify-between border-b px-3",
|
|
3127
3180
|
style: { height: "var(--topbar-height)" },
|
|
@@ -3140,7 +3193,7 @@ function En({ onMobileMenuToggle: e, breadcrumbs: t, navItems: n = [], navLabel:
|
|
|
3140
3193
|
"aria-label": d ? "Expand sidebar" : "Collapse sidebar",
|
|
3141
3194
|
children: _(d ? ae : ie, { className: "h-4 w-4" })
|
|
3142
3195
|
}),
|
|
3143
|
-
(b || t !== !1) && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", { className: "bg-border hidden h-4 w-px md:block" }), b ? /* @__PURE__ */ _(
|
|
3196
|
+
(b || t !== !1) && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", { className: "bg-border hidden h-4 w-px md:block" }), b ? /* @__PURE__ */ _(Nn, {
|
|
3144
3197
|
items: n,
|
|
3145
3198
|
label: r,
|
|
3146
3199
|
currentPath: s,
|
|
@@ -3173,16 +3226,16 @@ function En({ onMobileMenuToggle: e, breadcrumbs: t, navItems: n = [], navLabel:
|
|
|
3173
3226
|
/* @__PURE__ */ _("button", {
|
|
3174
3227
|
onClick: h,
|
|
3175
3228
|
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-7 w-7 cursor-pointer items-center justify-center rounded",
|
|
3176
|
-
"aria-label": `Color mode: ${
|
|
3177
|
-
title:
|
|
3229
|
+
"aria-label": `Color mode: ${jn[p]}. Click to cycle.`,
|
|
3230
|
+
title: jn[p],
|
|
3178
3231
|
children: /* @__PURE__ */ _(y, { className: "h-4 w-4" })
|
|
3179
3232
|
}),
|
|
3180
|
-
/* @__PURE__ */ _(
|
|
3233
|
+
/* @__PURE__ */ _(On, {})
|
|
3181
3234
|
]
|
|
3182
3235
|
})]
|
|
3183
3236
|
});
|
|
3184
3237
|
}
|
|
3185
|
-
function
|
|
3238
|
+
function Nn({ items: e, label: t, currentPath: n, onNavigate: r }) {
|
|
3186
3239
|
return /* @__PURE__ */ _("nav", {
|
|
3187
3240
|
className: "hidden min-w-0 items-center gap-1 md:flex",
|
|
3188
3241
|
"aria-label": t,
|
|
@@ -3214,7 +3267,7 @@ function Dn({ items: e, label: t, currentPath: n, onNavigate: r }) {
|
|
|
3214
3267
|
}
|
|
3215
3268
|
//#endregion
|
|
3216
3269
|
//#region src/components/app-shell/AppShell.tsx
|
|
3217
|
-
function
|
|
3270
|
+
function Pn({ children: e, navSections: t, brand: n, accounts: r, bottomNavItems: i = [], commandItems: a, breadcrumbs: o, initialAccountIndex: s, onAccountChange: c, onSignOut: l, signOutPath: u, signOutLabel: d, settingsPath: f, settingsLabel: m, onOpenSettings: g, showCommandPalette: y = !0, showCommandTrigger: b = !0, commandTriggerLabel: x, commandShortcut: S, sidebarHeaderActions: C, topBarActions: w, topBarNavItems: T, topBarNavLabel: E, currentPath: D, onNavigate: O, mainClassName: k, className: A }) {
|
|
3218
3271
|
let [j, M] = h(!1), N = p(() => t.flatMap((e) => e.items), [t]), P = a ?? N;
|
|
3219
3272
|
return /* @__PURE__ */ v("div", {
|
|
3220
3273
|
className: G("bg-bg-primary flex h-svh overflow-hidden", A),
|
|
@@ -3242,7 +3295,7 @@ function On({ children: e, navSections: t, brand: n, accounts: r, bottomNavItems
|
|
|
3242
3295
|
}),
|
|
3243
3296
|
/* @__PURE__ */ v("div", {
|
|
3244
3297
|
className: "flex min-w-0 flex-1 flex-col",
|
|
3245
|
-
children: [/* @__PURE__ */ _(
|
|
3298
|
+
children: [/* @__PURE__ */ _(Mn, {
|
|
3246
3299
|
onMobileMenuToggle: () => M(!0),
|
|
3247
3300
|
breadcrumbs: o,
|
|
3248
3301
|
showCommandTrigger: y && b,
|
|
@@ -3285,7 +3338,7 @@ function On({ children: e, navSections: t, brand: n, accounts: r, bottomNavItems
|
|
|
3285
3338
|
}
|
|
3286
3339
|
//#endregion
|
|
3287
3340
|
//#region src/components/app-shell/AuthLayout.tsx
|
|
3288
|
-
function
|
|
3341
|
+
function Fn({ children: e, className: t }) {
|
|
3289
3342
|
return /* @__PURE__ */ v("div", {
|
|
3290
3343
|
className: G("bg-bg-primary relative flex min-h-svh items-center justify-center p-4", t),
|
|
3291
3344
|
children: [/* @__PURE__ */ _("div", {
|
|
@@ -3296,7 +3349,7 @@ function kn({ children: e, className: t }) {
|
|
|
3296
3349
|
}
|
|
3297
3350
|
//#endregion
|
|
3298
3351
|
//#region src/components/app-shell/BackLink.tsx
|
|
3299
|
-
function
|
|
3352
|
+
function In({ to: e, children: t, onNavigate: n, className: r }) {
|
|
3300
3353
|
return /* @__PURE__ */ v("a", {
|
|
3301
3354
|
href: e,
|
|
3302
3355
|
onClick: (t) => ct(t, e, n),
|
|
@@ -3306,14 +3359,14 @@ function An({ to: e, children: t, onNavigate: n, className: r }) {
|
|
|
3306
3359
|
}
|
|
3307
3360
|
//#endregion
|
|
3308
3361
|
//#region src/components/ui/FieldContext.ts
|
|
3309
|
-
var
|
|
3310
|
-
function
|
|
3362
|
+
var Ln = r(null);
|
|
3363
|
+
function Rn(...e) {
|
|
3311
3364
|
return [...new Set(e.flatMap((e) => e?.split(/\s+/).filter(Boolean) ?? []))].join(" ") || void 0;
|
|
3312
3365
|
}
|
|
3313
3366
|
//#endregion
|
|
3314
3367
|
//#region src/components/ui/Checkbox.tsx
|
|
3315
|
-
var
|
|
3316
|
-
let x = u(), S = an(s), C = c(
|
|
3368
|
+
var zn = a(({ id: e, checked: t, indeterminate: n, onChange: r, label: i, ariaLabel: a, disabled: o, controlSize: s, className: d, "aria-label": f, "aria-describedby": p, "aria-invalid": h, required: g, ...y }, b) => {
|
|
3369
|
+
let x = u(), S = an(s), C = c(Ln), w = e ?? C?.id ?? x, T = m(null);
|
|
3317
3370
|
return l(() => {
|
|
3318
3371
|
T.current && (T.current.indeterminate = !!n);
|
|
3319
3372
|
}, [n]), /* @__PURE__ */ v("div", {
|
|
@@ -3332,7 +3385,7 @@ var Nn = a(({ id: e, checked: t, indeterminate: n, onChange: r, label: i, ariaLa
|
|
|
3332
3385
|
checked: t,
|
|
3333
3386
|
"aria-checked": n ? "mixed" : t,
|
|
3334
3387
|
"aria-label": f ?? a,
|
|
3335
|
-
"aria-describedby":
|
|
3388
|
+
"aria-describedby": Rn(p, C?.describedBy),
|
|
3336
3389
|
"aria-invalid": h ?? (C?.invalid || void 0),
|
|
3337
3390
|
disabled: o,
|
|
3338
3391
|
required: g ?? C?.required,
|
|
@@ -3350,10 +3403,10 @@ var Nn = a(({ id: e, checked: t, indeterminate: n, onChange: r, label: i, ariaLa
|
|
|
3350
3403
|
})]
|
|
3351
3404
|
});
|
|
3352
3405
|
});
|
|
3353
|
-
|
|
3406
|
+
zn.displayName = "Checkbox";
|
|
3354
3407
|
//#endregion
|
|
3355
3408
|
//#region src/components/ui/FilterButton.tsx
|
|
3356
|
-
var
|
|
3409
|
+
var Bn = a(function({ icon: e, children: t, className: n, ...r }, i) {
|
|
3357
3410
|
return /* @__PURE__ */ v("button", {
|
|
3358
3411
|
ref: i,
|
|
3359
3412
|
className: G("flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2.5", "border-border bg-bg-secondary text-text-secondary border", "hover:bg-bg-hover hover:border-border-strong", "text-xs", "transition-colors duration-[100ms]", n),
|
|
@@ -3366,15 +3419,15 @@ var Pn = a(function({ icon: e, children: t, className: n, ...r }, i) {
|
|
|
3366
3419
|
});
|
|
3367
3420
|
//#endregion
|
|
3368
3421
|
//#region src/components/tables/ColumnPicker.tsx
|
|
3369
|
-
function
|
|
3422
|
+
function Vn(e) {
|
|
3370
3423
|
return typeof e.header == "string" ? e.header : e.sortLabel ?? e.key;
|
|
3371
3424
|
}
|
|
3372
|
-
function
|
|
3425
|
+
function Hn({ columns: e, hidden: n, onToggle: r, label: i = "Columns", heading: a = "Toggle columns", icon: o = M, onOnly: c, onlyLabel: l = "Only", footer: u }) {
|
|
3373
3426
|
let [d, f] = h(!1), p = m(null);
|
|
3374
3427
|
return jt(d, s(() => f(!1), []), [p]), /* @__PURE__ */ v("div", {
|
|
3375
3428
|
className: "relative",
|
|
3376
3429
|
ref: p,
|
|
3377
|
-
children: [/* @__PURE__ */ _(
|
|
3430
|
+
children: [/* @__PURE__ */ _(Bn, {
|
|
3378
3431
|
icon: o,
|
|
3379
3432
|
onClick: () => f(!d),
|
|
3380
3433
|
children: i
|
|
@@ -3387,10 +3440,10 @@ function In({ columns: e, hidden: n, onToggle: r, label: i = "Columns", heading:
|
|
|
3387
3440
|
onClick: () => r(i.key),
|
|
3388
3441
|
className: "group text-text-secondary hover:text-text-primary hover:bg-bg-hover flex h-7 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
|
|
3389
3442
|
children: [
|
|
3390
|
-
/* @__PURE__ */ _(
|
|
3443
|
+
/* @__PURE__ */ _(zn, {
|
|
3391
3444
|
checked: !n.has(i.key),
|
|
3392
3445
|
onChange: () => {},
|
|
3393
|
-
ariaLabel:
|
|
3446
|
+
ariaLabel: Vn(i)
|
|
3394
3447
|
}),
|
|
3395
3448
|
/* @__PURE__ */ _("span", {
|
|
3396
3449
|
className: "min-w-0 flex-1 truncate",
|
|
@@ -3398,7 +3451,7 @@ function In({ columns: e, hidden: n, onToggle: r, label: i = "Columns", heading:
|
|
|
3398
3451
|
}),
|
|
3399
3452
|
c && /* @__PURE__ */ _("button", {
|
|
3400
3453
|
type: "button",
|
|
3401
|
-
"aria-label": `${l}: ${
|
|
3454
|
+
"aria-label": `${l}: ${Vn(i)}`,
|
|
3402
3455
|
onClick: (e) => {
|
|
3403
3456
|
e.stopPropagation(), c(i.key);
|
|
3404
3457
|
},
|
|
@@ -3415,7 +3468,7 @@ function In({ columns: e, hidden: n, onToggle: r, label: i = "Columns", heading:
|
|
|
3415
3468
|
}
|
|
3416
3469
|
//#endregion
|
|
3417
3470
|
//#region src/components/tables/Pagination.tsx
|
|
3418
|
-
function
|
|
3471
|
+
function Un({ page: e, totalPages: t, onPageChange: n }) {
|
|
3419
3472
|
if (t <= 1) return null;
|
|
3420
3473
|
let r = [];
|
|
3421
3474
|
for (let n = 1; n <= t; n++) n === 1 || n === t || n >= e - 1 && n <= e + 1 ? r.push(n) : r[r.length - 1] !== "ellipsis" && r.push("ellipsis");
|
|
@@ -3449,7 +3502,7 @@ function Ln({ page: e, totalPages: t, onPageChange: n }) {
|
|
|
3449
3502
|
}
|
|
3450
3503
|
//#endregion
|
|
3451
3504
|
//#region src/components/tables/sortRows.ts
|
|
3452
|
-
function
|
|
3505
|
+
function Wn(e, t, n, r) {
|
|
3453
3506
|
if (!n) return e;
|
|
3454
3507
|
let i = t.find((e) => e.key === n)?.getValue;
|
|
3455
3508
|
return i ? [...e].sort((e, t) => {
|
|
@@ -3459,8 +3512,8 @@ function Rn(e, t, n, r) {
|
|
|
3459
3512
|
}
|
|
3460
3513
|
//#endregion
|
|
3461
3514
|
//#region src/components/tables/ResourceTable.tsx
|
|
3462
|
-
function
|
|
3463
|
-
let b = c !== void 0, [S, w] = h(null), [T, E] = h("asc"), D = b ? o ?? null : S, O = b ? s ?? "asc" : T, k = p(() => b ? e :
|
|
3515
|
+
function Gn({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: a = "No data", sortKey: o, sortDir: s, onSortChange: c, caption: l, loading: u = !1, loadingMessage: d = "Loading…", className: f, tableProps: m, getRowProps: g, isRowSelected: y }) {
|
|
3516
|
+
let b = c !== void 0, [S, w] = h(null), [T, E] = h("asc"), D = b ? o ?? null : S, O = b ? s ?? "asc" : T, k = p(() => b ? e : Wn(e, t, D, O), [
|
|
3464
3517
|
b,
|
|
3465
3518
|
e,
|
|
3466
3519
|
t,
|
|
@@ -3535,7 +3588,13 @@ function zn({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: a =
|
|
|
3535
3588
|
}
|
|
3536
3589
|
//#endregion
|
|
3537
3590
|
//#region src/components/ui/Alert.tsx
|
|
3538
|
-
var
|
|
3591
|
+
var Kn = {
|
|
3592
|
+
neutral: {
|
|
3593
|
+
bg: "bg-bg-hover",
|
|
3594
|
+
border: "border-border",
|
|
3595
|
+
icon: I,
|
|
3596
|
+
iconColor: "text-text-tertiary"
|
|
3597
|
+
},
|
|
3539
3598
|
success: {
|
|
3540
3599
|
bg: "bg-green-muted",
|
|
3541
3600
|
border: "border-green/30",
|
|
@@ -3561,26 +3620,31 @@ var Bn = {
|
|
|
3561
3620
|
iconColor: "text-blue"
|
|
3562
3621
|
}
|
|
3563
3622
|
};
|
|
3564
|
-
function
|
|
3565
|
-
let [
|
|
3566
|
-
if (
|
|
3567
|
-
let
|
|
3623
|
+
function qn({ type: e, title: t, children: n, dismissible: r, className: i, actions: a, toneBody: o = !1, ...s }) {
|
|
3624
|
+
let [c, l] = h(!1);
|
|
3625
|
+
if (c) return null;
|
|
3626
|
+
let u = Kn[e], d = u.icon, f = e === "neutral" ? "text-text-primary" : u.iconColor;
|
|
3568
3627
|
return /* @__PURE__ */ v("div", {
|
|
3569
|
-
|
|
3628
|
+
...s,
|
|
3629
|
+
className: G("flex gap-2.5 rounded-md border p-3", u.bg, u.border, i),
|
|
3570
3630
|
children: [
|
|
3571
|
-
/* @__PURE__ */ _(
|
|
3631
|
+
/* @__PURE__ */ _(d, { className: G("mt-0.5 h-4 w-4 shrink-0", u.iconColor) }),
|
|
3572
3632
|
/* @__PURE__ */ v("div", {
|
|
3573
3633
|
className: "min-w-0 flex-1",
|
|
3574
3634
|
children: [t && /* @__PURE__ */ _("p", {
|
|
3575
|
-
className: "text-text-primary mb-0.5 text-xs font-semibold",
|
|
3635
|
+
className: G(o ? f : "text-text-primary", "mb-0.5 text-xs font-semibold"),
|
|
3576
3636
|
children: t
|
|
3577
3637
|
}), /* @__PURE__ */ _("div", {
|
|
3578
|
-
className: "text-text-secondary text-xs",
|
|
3638
|
+
className: G(o ? f : "text-text-secondary", "text-xs"),
|
|
3579
3639
|
children: n
|
|
3580
3640
|
})]
|
|
3581
3641
|
}),
|
|
3642
|
+
a ? /* @__PURE__ */ _("div", {
|
|
3643
|
+
className: "shrink-0 self-center",
|
|
3644
|
+
children: a
|
|
3645
|
+
}) : null,
|
|
3582
3646
|
r && /* @__PURE__ */ _("button", {
|
|
3583
|
-
onClick: () =>
|
|
3647
|
+
onClick: () => l(!0),
|
|
3584
3648
|
className: "text-text-tertiary hover:text-text-primary flex h-5 w-5 cursor-pointer items-center justify-center rounded",
|
|
3585
3649
|
"aria-label": "Dismiss",
|
|
3586
3650
|
children: /* @__PURE__ */ _(V, { className: "h-3 w-3" })
|
|
@@ -3590,7 +3654,7 @@ function Vn({ type: e, title: t, children: n, dismissible: r, className: i }) {
|
|
|
3590
3654
|
}
|
|
3591
3655
|
//#endregion
|
|
3592
3656
|
//#region src/components/ui/AuthCard.tsx
|
|
3593
|
-
function
|
|
3657
|
+
function Jn({ title: e, subtitle: t, icon: n, children: r, footer: i, className: a }) {
|
|
3594
3658
|
return /* @__PURE__ */ _("div", {
|
|
3595
3659
|
className: G("relative z-10 w-full max-w-sm", a),
|
|
3596
3660
|
children: /* @__PURE__ */ v("div", {
|
|
@@ -3624,7 +3688,7 @@ function Hn({ title: e, subtitle: t, icon: n, children: r, footer: i, className:
|
|
|
3624
3688
|
}
|
|
3625
3689
|
//#endregion
|
|
3626
3690
|
//#region src/components/ui/AuthorByline.tsx
|
|
3627
|
-
function
|
|
3691
|
+
function Yn({ name: e, meta: t, nameAppend: n, size: r = "sm", className: i }) {
|
|
3628
3692
|
return /* @__PURE__ */ v("div", {
|
|
3629
3693
|
className: G("flex items-center gap-2", i),
|
|
3630
3694
|
children: [/* @__PURE__ */ _(Lt, {
|
|
@@ -3641,14 +3705,18 @@ function Un({ name: e, meta: t, nameAppend: n, size: r = "sm", className: i }) {
|
|
|
3641
3705
|
}
|
|
3642
3706
|
//#endregion
|
|
3643
3707
|
//#region src/components/ui/Badge.tsx
|
|
3644
|
-
var
|
|
3708
|
+
var Xn = {
|
|
3709
|
+
teal: "bg-teal-muted text-teal",
|
|
3710
|
+
rose: "bg-rose-muted text-rose",
|
|
3645
3711
|
green: "bg-green-muted text-green",
|
|
3646
3712
|
yellow: "bg-yellow-muted text-yellow",
|
|
3647
3713
|
red: "bg-red-muted text-red",
|
|
3648
3714
|
blue: "bg-blue-muted text-blue",
|
|
3649
3715
|
purple: "bg-purple-muted text-purple",
|
|
3650
3716
|
gray: "bg-bg-hover text-text-secondary"
|
|
3651
|
-
},
|
|
3717
|
+
}, Zn = {
|
|
3718
|
+
teal: "bg-teal",
|
|
3719
|
+
rose: "bg-rose",
|
|
3652
3720
|
green: "bg-green",
|
|
3653
3721
|
yellow: "bg-yellow",
|
|
3654
3722
|
red: "bg-red",
|
|
@@ -3656,15 +3724,15 @@ var Wn = {
|
|
|
3656
3724
|
purple: "bg-purple",
|
|
3657
3725
|
gray: "bg-text-tertiary"
|
|
3658
3726
|
};
|
|
3659
|
-
function
|
|
3727
|
+
function Qn({ color: e = "gray", dot: t, children: n, className: r }) {
|
|
3660
3728
|
return /* @__PURE__ */ v("span", {
|
|
3661
|
-
className: G("font-label text-2xs inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 font-medium",
|
|
3662
|
-
children: [t && /* @__PURE__ */ _("span", { className: G("h-1.5 w-1.5 rounded-full",
|
|
3729
|
+
className: G("font-label text-2xs inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 font-medium", Xn[e], r),
|
|
3730
|
+
children: [t && /* @__PURE__ */ _("span", { className: G("h-1.5 w-1.5 rounded-full", Zn[e]) }), n]
|
|
3663
3731
|
});
|
|
3664
3732
|
}
|
|
3665
3733
|
//#endregion
|
|
3666
3734
|
//#region src/lib/calendar.ts
|
|
3667
|
-
var
|
|
3735
|
+
var $n = /* @__PURE__ */ new Map();
|
|
3668
3736
|
function Z(e, t) {
|
|
3669
3737
|
if (!t) return {
|
|
3670
3738
|
year: e.getFullYear(),
|
|
@@ -3675,7 +3743,7 @@ function Z(e, t) {
|
|
|
3675
3743
|
second: e.getSeconds(),
|
|
3676
3744
|
millisecond: e.getMilliseconds()
|
|
3677
3745
|
};
|
|
3678
|
-
let n =
|
|
3746
|
+
let n = $n.get(t);
|
|
3679
3747
|
n || (n = new Intl.DateTimeFormat("en-GB-u-ca-iso8601-nu-latn", {
|
|
3680
3748
|
timeZone: t,
|
|
3681
3749
|
year: "numeric",
|
|
@@ -3685,7 +3753,7 @@ function Z(e, t) {
|
|
|
3685
3753
|
minute: "2-digit",
|
|
3686
3754
|
second: "2-digit",
|
|
3687
3755
|
hourCycle: "h23"
|
|
3688
|
-
}),
|
|
3756
|
+
}), $n.set(t, n));
|
|
3689
3757
|
let r = {};
|
|
3690
3758
|
for (let t of n.formatToParts(e)) t.type !== "literal" && (r[t.type] = Number(t.value));
|
|
3691
3759
|
return {
|
|
@@ -3698,12 +3766,12 @@ function Z(e, t) {
|
|
|
3698
3766
|
millisecond: e.getUTCMilliseconds()
|
|
3699
3767
|
};
|
|
3700
3768
|
}
|
|
3701
|
-
function
|
|
3769
|
+
function er(e) {
|
|
3702
3770
|
let t = /* @__PURE__ */ new Date(0);
|
|
3703
3771
|
return t.setUTCFullYear(e.year, e.month - 1, e.day), t.setUTCHours(e.hour, e.minute, e.second, e.millisecond), t.getTime();
|
|
3704
3772
|
}
|
|
3705
|
-
function
|
|
3706
|
-
let r =
|
|
3773
|
+
function tr(e, t, n = "compatible") {
|
|
3774
|
+
let r = er(e), i = new Date(r);
|
|
3707
3775
|
if (!Object.values(e).every(Number.isInteger) || i.getUTCFullYear() !== e.year || i.getUTCMonth() + 1 !== e.month || i.getUTCDate() !== e.day || i.getUTCHours() !== e.hour || i.getUTCMinutes() !== e.minute || i.getUTCSeconds() !== e.second || i.getUTCMilliseconds() !== e.millisecond) throw RangeError("Invalid civil date and time");
|
|
3708
3776
|
if (!t) {
|
|
3709
3777
|
let t = /* @__PURE__ */ new Date(0);
|
|
@@ -3718,98 +3786,98 @@ function Yn(e, t, n = "compatible") {
|
|
|
3718
3786
|
48
|
|
3719
3787
|
]) {
|
|
3720
3788
|
let n = r + e * 36e5;
|
|
3721
|
-
a.add(
|
|
3789
|
+
a.add(er(Z(new Date(n), t)) - n);
|
|
3722
3790
|
}
|
|
3723
|
-
let o = [...a].map((e) => r - e).sort((e, t) => e - t), s = o.filter((e) =>
|
|
3791
|
+
let o = [...a].map((e) => r - e).sort((e, t) => e - t), s = o.filter((e) => er(Z(new Date(e), t)) === r);
|
|
3724
3792
|
if (s.length === 1) return new Date(s[0]);
|
|
3725
3793
|
if (n === "reject") throw RangeError(s.length ? "This time occurs twice in the selected timezone" : "This time does not exist in the selected timezone");
|
|
3726
3794
|
return s.length ? new Date(n === "later" ? s[s.length - 1] : s[0]) : new Date(n === "earlier" ? o[0] : o[o.length - 1]);
|
|
3727
3795
|
}
|
|
3728
|
-
var
|
|
3796
|
+
var nr = 1440, rr = 6e4, ir = [
|
|
3729
3797
|
1,
|
|
3730
3798
|
2,
|
|
3731
3799
|
3,
|
|
3732
3800
|
4,
|
|
3733
3801
|
5
|
|
3734
3802
|
];
|
|
3735
|
-
function
|
|
3803
|
+
function ar(e) {
|
|
3736
3804
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate());
|
|
3737
3805
|
}
|
|
3738
3806
|
function Q(e, t) {
|
|
3739
3807
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate() + t, e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
|
|
3740
3808
|
}
|
|
3741
|
-
function
|
|
3809
|
+
function or(e, t) {
|
|
3742
3810
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes() + t, e.getSeconds(), e.getMilliseconds());
|
|
3743
3811
|
}
|
|
3744
|
-
function
|
|
3812
|
+
function sr(e, t) {
|
|
3745
3813
|
let n = new Date(e.getFullYear(), e.getMonth() + t, 1), r = new Date(n.getFullYear(), n.getMonth() + 1, 0).getDate();
|
|
3746
3814
|
return new Date(n.getFullYear(), n.getMonth(), Math.min(e.getDate(), r), e.getHours(), e.getMinutes());
|
|
3747
3815
|
}
|
|
3748
|
-
function
|
|
3749
|
-
let n =
|
|
3816
|
+
function cr(e, t = 1) {
|
|
3817
|
+
let n = ar(e);
|
|
3750
3818
|
return Q(n, -((n.getDay() - t + 7) % 7));
|
|
3751
3819
|
}
|
|
3752
|
-
function
|
|
3820
|
+
function lr(e) {
|
|
3753
3821
|
return new Date(e.getFullYear(), e.getMonth(), 1);
|
|
3754
3822
|
}
|
|
3755
|
-
function
|
|
3823
|
+
function ur(e, t) {
|
|
3756
3824
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
3757
3825
|
}
|
|
3758
|
-
function
|
|
3826
|
+
function dr(e, t) {
|
|
3759
3827
|
let n = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), r = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
|
|
3760
3828
|
return Math.round((n - r) / 864e5);
|
|
3761
3829
|
}
|
|
3762
|
-
function
|
|
3763
|
-
return e.getHours() * 60 + e.getMinutes() + e.getSeconds() / 60 + e.getMilliseconds() /
|
|
3830
|
+
function fr(e) {
|
|
3831
|
+
return e.getHours() * 60 + e.getMinutes() + e.getSeconds() / 60 + e.getMilliseconds() / rr;
|
|
3764
3832
|
}
|
|
3765
|
-
function
|
|
3766
|
-
let n =
|
|
3767
|
-
if (!
|
|
3833
|
+
function pr(e, t) {
|
|
3834
|
+
let n = mr(e, t);
|
|
3835
|
+
if (!ur(n, e) || fr(n) <= t) return n;
|
|
3768
3836
|
let r = Math.floor(t);
|
|
3769
|
-
for (; r > 0 &&
|
|
3770
|
-
return /* @__PURE__ */ new Date(n.getTime() - (t - r) *
|
|
3837
|
+
for (; r > 0 && fr(mr(e, r - 1)) !== r - 1;) r--;
|
|
3838
|
+
return /* @__PURE__ */ new Date(n.getTime() - (t - r) * rr);
|
|
3771
3839
|
}
|
|
3772
|
-
function
|
|
3840
|
+
function mr(e, t) {
|
|
3773
3841
|
let n = Math.floor(t);
|
|
3774
3842
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate(), 0, n, Math.round((t - n) * 60));
|
|
3775
3843
|
}
|
|
3776
|
-
function
|
|
3844
|
+
function hr(e) {
|
|
3777
3845
|
let t = /^(\d{1,2}):(\d{2})$/.exec(e.trim());
|
|
3778
3846
|
if (!t) throw RangeError(`Invalid time "${e}", expected HH:mm`);
|
|
3779
3847
|
let n = Number(t[1]), r = Number(t[2]);
|
|
3780
3848
|
if (r > 59 || n > 24 || n === 24 && r > 0) throw RangeError(`Invalid time "${e}"`);
|
|
3781
3849
|
return n * 60 + r;
|
|
3782
3850
|
}
|
|
3783
|
-
function
|
|
3851
|
+
function gr(e) {
|
|
3784
3852
|
let t = Math.round(e), n = Math.floor(t / 60), r = t % 60;
|
|
3785
3853
|
return `${String(n).padStart(2, "0")}:${String(r).padStart(2, "0")}`;
|
|
3786
3854
|
}
|
|
3787
|
-
function
|
|
3855
|
+
function _r(e) {
|
|
3788
3856
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
3789
3857
|
}
|
|
3790
|
-
function
|
|
3858
|
+
function vr(e) {
|
|
3791
3859
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
|
|
3792
3860
|
if (!t) throw RangeError(`Invalid date key "${e}"`);
|
|
3793
3861
|
let n = new Date(Number(t[1]), Number(t[2]) - 1, Number(t[3]));
|
|
3794
|
-
if (
|
|
3862
|
+
if (_r(n) !== e) throw RangeError(`Invalid date key "${e}"`);
|
|
3795
3863
|
return n;
|
|
3796
3864
|
}
|
|
3797
|
-
function
|
|
3865
|
+
function yr(e, t, n = "round") {
|
|
3798
3866
|
if (t <= 0) return e;
|
|
3799
3867
|
let r = n === "floor" ? Math.floor : n === "ceil" ? Math.ceil : Math.round, i = e / t;
|
|
3800
3868
|
return r(n === "floor" ? i + 1e-9 : n === "ceil" ? i - 1e-9 : i) * t;
|
|
3801
3869
|
}
|
|
3802
|
-
function
|
|
3803
|
-
return
|
|
3870
|
+
function br(e, t, n = "round") {
|
|
3871
|
+
return mr(ar(e), yr(fr(e), t, n));
|
|
3804
3872
|
}
|
|
3805
3873
|
function $(e, t, n) {
|
|
3806
3874
|
return Math.min(n, Math.max(t, e));
|
|
3807
3875
|
}
|
|
3808
|
-
function
|
|
3876
|
+
function xr(e) {
|
|
3809
3877
|
return e === "day" || e === "threeDay" || e === "workWeek" || e === "week";
|
|
3810
3878
|
}
|
|
3811
|
-
function
|
|
3812
|
-
let r = n.weekStartsOn ?? 1, i =
|
|
3879
|
+
function Sr(e, t, n = {}) {
|
|
3880
|
+
let r = n.weekStartsOn ?? 1, i = ar(t);
|
|
3813
3881
|
switch (e) {
|
|
3814
3882
|
case "day":
|
|
3815
3883
|
case "timeline": return [i];
|
|
@@ -3819,36 +3887,36 @@ function gr(e, t, n = {}) {
|
|
|
3819
3887
|
Q(i, 2)
|
|
3820
3888
|
];
|
|
3821
3889
|
case "week": {
|
|
3822
|
-
let e =
|
|
3890
|
+
let e = cr(i, r);
|
|
3823
3891
|
return Array.from({ length: 7 }, (t, n) => Q(e, n));
|
|
3824
3892
|
}
|
|
3825
3893
|
case "workWeek": {
|
|
3826
|
-
let e = new Set(n.workWeekDays ??
|
|
3894
|
+
let e = new Set(n.workWeekDays ?? ir), t = cr(i, r), a = Array.from({ length: 7 }, (e, n) => Q(t, n)).filter((t) => e.has(t.getDay()));
|
|
3827
3895
|
return a.length ? a : [i];
|
|
3828
3896
|
}
|
|
3829
3897
|
case "agenda": {
|
|
3830
3898
|
let e = Math.max(1, Math.floor(n.agendaDays ?? 7));
|
|
3831
3899
|
return Array.from({ length: e }, (e, t) => Q(i, t));
|
|
3832
3900
|
}
|
|
3833
|
-
case "month": return
|
|
3901
|
+
case "month": return Cr(t, r).flat();
|
|
3834
3902
|
}
|
|
3835
3903
|
}
|
|
3836
|
-
function
|
|
3837
|
-
let n =
|
|
3904
|
+
function Cr(e, t = 1) {
|
|
3905
|
+
let n = lr(e), r = new Date(n.getFullYear(), n.getMonth() + 1, 0), i = cr(n, t), a = [], o = i;
|
|
3838
3906
|
for (; o <= r || a.length === 0;) {
|
|
3839
3907
|
let e = Array.from({ length: 7 }, (e, t) => Q(o, t));
|
|
3840
3908
|
a.push(e), o = Q(o, 7);
|
|
3841
3909
|
}
|
|
3842
3910
|
return a;
|
|
3843
3911
|
}
|
|
3844
|
-
function
|
|
3845
|
-
let r =
|
|
3912
|
+
function wr(e, t, n = {}) {
|
|
3913
|
+
let r = Sr(e, t, n);
|
|
3846
3914
|
return {
|
|
3847
3915
|
start: r[0],
|
|
3848
3916
|
end: Q(r[r.length - 1], 1)
|
|
3849
3917
|
};
|
|
3850
3918
|
}
|
|
3851
|
-
function
|
|
3919
|
+
function Tr(e, t, n, r = {}) {
|
|
3852
3920
|
switch (e) {
|
|
3853
3921
|
case "day":
|
|
3854
3922
|
case "timeline": return Q(t, n);
|
|
@@ -3856,16 +3924,16 @@ function yr(e, t, n, r = {}) {
|
|
|
3856
3924
|
case "week":
|
|
3857
3925
|
case "workWeek": return Q(t, 7 * n);
|
|
3858
3926
|
case "agenda": return Q(t, Math.max(1, r.agendaDays ?? 7) * n);
|
|
3859
|
-
case "month": return
|
|
3927
|
+
case "month": return sr(t, n);
|
|
3860
3928
|
}
|
|
3861
3929
|
}
|
|
3862
|
-
var
|
|
3863
|
-
function
|
|
3864
|
-
let n = `${e}|${JSON.stringify(t)}`, r =
|
|
3865
|
-
return r || (r = new Intl.DateTimeFormat(e, t),
|
|
3930
|
+
var Er = /* @__PURE__ */ new Map();
|
|
3931
|
+
function Dr(e, t) {
|
|
3932
|
+
let n = `${e}|${JSON.stringify(t)}`, r = Er.get(n);
|
|
3933
|
+
return r || (r = new Intl.DateTimeFormat(e, t), Er.set(n, r)), r;
|
|
3866
3934
|
}
|
|
3867
|
-
function
|
|
3868
|
-
return
|
|
3935
|
+
function Or(e, t = {}) {
|
|
3936
|
+
return Dr(t.locale ?? "en-GB", {
|
|
3869
3937
|
timeZone: t.timeZone,
|
|
3870
3938
|
timeZoneName: t.timeZone ? "short" : void 0,
|
|
3871
3939
|
hour: t.hour12 ? "numeric" : "2-digit",
|
|
@@ -3873,71 +3941,71 @@ function Sr(e, t = {}) {
|
|
|
3873
3941
|
hourCycle: t.hour12 ? "h12" : "h23"
|
|
3874
3942
|
}).format(e);
|
|
3875
3943
|
}
|
|
3876
|
-
function
|
|
3877
|
-
return `${
|
|
3944
|
+
function kr(e, t, n = {}) {
|
|
3945
|
+
return `${Or(e, n)}–${Or(t, n)}`;
|
|
3878
3946
|
}
|
|
3879
|
-
function
|
|
3880
|
-
if (!t.hour12) return
|
|
3881
|
-
let n =
|
|
3882
|
-
return
|
|
3947
|
+
function Ar(e, t = {}) {
|
|
3948
|
+
if (!t.hour12) return gr(e);
|
|
3949
|
+
let n = mr(new Date(2e3, 0, 1), e);
|
|
3950
|
+
return Dr(t.locale ?? "en-GB", {
|
|
3883
3951
|
hour: "numeric",
|
|
3884
3952
|
minute: e % 60 ? "2-digit" : void 0,
|
|
3885
3953
|
hour12: !0
|
|
3886
3954
|
}).format(n);
|
|
3887
3955
|
}
|
|
3888
|
-
function
|
|
3889
|
-
return
|
|
3956
|
+
function jr(e, t = "en-GB") {
|
|
3957
|
+
return Dr(t, {
|
|
3890
3958
|
weekday: "long",
|
|
3891
3959
|
day: "numeric",
|
|
3892
3960
|
month: "long",
|
|
3893
3961
|
year: "numeric"
|
|
3894
3962
|
}).format(e);
|
|
3895
3963
|
}
|
|
3896
|
-
function
|
|
3964
|
+
function Mr(e, t, n = {}) {
|
|
3897
3965
|
let r = n.locale ?? "en-GB";
|
|
3898
|
-
if (e === "month") return
|
|
3966
|
+
if (e === "month") return Dr(r, {
|
|
3899
3967
|
month: "long",
|
|
3900
3968
|
year: "numeric"
|
|
3901
3969
|
}).format(t);
|
|
3902
|
-
let i =
|
|
3903
|
-
if (i.length === 1) return
|
|
3904
|
-
let s = a.getFullYear() === o.getFullYear(), c = s && a.getMonth() === o.getMonth(), l =
|
|
3970
|
+
let i = Sr(e, t, n), a = i[0], o = i[i.length - 1];
|
|
3971
|
+
if (i.length === 1) return jr(a, r);
|
|
3972
|
+
let s = a.getFullYear() === o.getFullYear(), c = s && a.getMonth() === o.getMonth(), l = Dr(r, {
|
|
3905
3973
|
day: "numeric",
|
|
3906
3974
|
month: "long",
|
|
3907
3975
|
year: "numeric"
|
|
3908
3976
|
});
|
|
3909
3977
|
if (c) return `${a.getDate()} – ${l.format(o)}`;
|
|
3910
|
-
let u =
|
|
3978
|
+
let u = Dr(r, s ? {
|
|
3911
3979
|
day: "numeric",
|
|
3912
3980
|
month: "short"
|
|
3913
3981
|
} : {
|
|
3914
3982
|
day: "numeric",
|
|
3915
3983
|
month: "short",
|
|
3916
3984
|
year: "numeric"
|
|
3917
|
-
}), d =
|
|
3985
|
+
}), d = Dr(r, {
|
|
3918
3986
|
day: "numeric",
|
|
3919
3987
|
month: "short",
|
|
3920
3988
|
year: "numeric"
|
|
3921
3989
|
});
|
|
3922
3990
|
return `${u.format(a)} – ${d.format(o)}`;
|
|
3923
3991
|
}
|
|
3924
|
-
function
|
|
3992
|
+
function Nr(e, t, n, r) {
|
|
3925
3993
|
return e < r && n < t;
|
|
3926
3994
|
}
|
|
3927
|
-
function
|
|
3928
|
-
let r =
|
|
3995
|
+
function Pr(e, t, n) {
|
|
3996
|
+
let r = ar(n), i = Q(r, 1), a = e.getTime(), o = Math.max(t.getTime(), a);
|
|
3929
3997
|
if (o === a) {
|
|
3930
3998
|
if (a < r.getTime() || a >= i.getTime()) return null;
|
|
3931
|
-
} else if (!
|
|
3999
|
+
} else if (!Nr(a, o, r.getTime(), i.getTime())) return null;
|
|
3932
4000
|
let s = a < r.getTime(), c = o > i.getTime();
|
|
3933
4001
|
return {
|
|
3934
|
-
startMinute: s ? 0 :
|
|
3935
|
-
endMinute: o >= i.getTime() ?
|
|
4002
|
+
startMinute: s ? 0 : fr(e),
|
|
4003
|
+
endMinute: o >= i.getTime() ? nr : Math.max(fr(t), s ? 0 : fr(e)),
|
|
3936
4004
|
continuesBefore: s,
|
|
3937
4005
|
continuesAfter: c
|
|
3938
4006
|
};
|
|
3939
4007
|
}
|
|
3940
|
-
function
|
|
4008
|
+
function Fr(e) {
|
|
3941
4009
|
let t = e.filter(([e, t]) => t > e).map(([e, t]) => [e, t]).sort((e, t) => e[0] - t[0]), n = [];
|
|
3942
4010
|
for (let [e, r] of t) {
|
|
3943
4011
|
let t = n[n.length - 1];
|
|
@@ -3945,12 +4013,12 @@ function kr(e) {
|
|
|
3945
4013
|
}
|
|
3946
4014
|
return n;
|
|
3947
4015
|
}
|
|
3948
|
-
function
|
|
4016
|
+
function Ir(e, t, n) {
|
|
3949
4017
|
let r = [], i = e;
|
|
3950
|
-
for (let [e, a] of
|
|
4018
|
+
for (let [e, a] of Fr(n)) if (!(a <= i) && (e >= t || (e > i && r.push([i, Math.min(e, t)]), i = Math.max(i, a), i >= t))) break;
|
|
3951
4019
|
return i < t && r.push([i, t]), r;
|
|
3952
4020
|
}
|
|
3953
|
-
function
|
|
4021
|
+
function Lr(e, t = 0) {
|
|
3954
4022
|
let n = e.map((e) => ({
|
|
3955
4023
|
id: e.id,
|
|
3956
4024
|
start: e.start,
|
|
@@ -3959,7 +4027,7 @@ function jr(e, t = 0) {
|
|
|
3959
4027
|
let e = a.length;
|
|
3960
4028
|
for (let t of i) {
|
|
3961
4029
|
let n = 1;
|
|
3962
|
-
for (let r = t.column + 1; r < e && !i.some((e) => e.column === r &&
|
|
4030
|
+
for (let r = t.column + 1; r < e && !i.some((e) => e.column === r && Nr(t.start, t.end, e.start, e.end)); r++) n++;
|
|
3963
4031
|
r.set(t.id, {
|
|
3964
4032
|
column: t.column,
|
|
3965
4033
|
columns: e,
|
|
@@ -3978,7 +4046,7 @@ function jr(e, t = 0) {
|
|
|
3978
4046
|
}
|
|
3979
4047
|
return s(), r;
|
|
3980
4048
|
}
|
|
3981
|
-
function
|
|
4049
|
+
function Rr(e) {
|
|
3982
4050
|
let t = [...e].sort((e, t) => e.start - t.start || t.end - e.end || (e.id < t.id ? -1 : 1)), n = [], r = /* @__PURE__ */ new Map();
|
|
3983
4051
|
for (let e of t) {
|
|
3984
4052
|
let t = Math.max(e.end, e.start + 1e-6), i = n.findIndex((t) => t <= e.start);
|
|
@@ -3989,34 +4057,34 @@ function Mr(e) {
|
|
|
3989
4057
|
count: n.length
|
|
3990
4058
|
};
|
|
3991
4059
|
}
|
|
3992
|
-
function
|
|
4060
|
+
function zr(e) {
|
|
3993
4061
|
return e === void 0 ? [] : typeof e == "string" ? [e] : e;
|
|
3994
4062
|
}
|
|
3995
|
-
function
|
|
4063
|
+
function Br(e, t, { emptyMatchesAll: n }) {
|
|
3996
4064
|
if (t === void 0) return !0;
|
|
3997
|
-
let r =
|
|
4065
|
+
let r = zr(e);
|
|
3998
4066
|
return r.length === 0 ? n : r.includes(t);
|
|
3999
4067
|
}
|
|
4000
|
-
function
|
|
4001
|
-
let r =
|
|
4068
|
+
function Vr(e, t, n) {
|
|
4069
|
+
let r = zr(e);
|
|
4002
4070
|
if (t === void 0 || n === void 0 || t === n) return r.length ? [...r] : void 0;
|
|
4003
4071
|
if (r.length === 0) return;
|
|
4004
4072
|
let i = r.map((e) => e === t ? n : e);
|
|
4005
4073
|
return [...new Set(i)];
|
|
4006
4074
|
}
|
|
4007
|
-
function
|
|
4075
|
+
function Hr(e, t, n = []) {
|
|
4008
4076
|
let r = /* @__PURE__ */ new Set(), i = e.start.getTime(), a = e.end.getTime();
|
|
4009
|
-
for (let e of [...t, ...n]) if (
|
|
4077
|
+
for (let e of [...t, ...n]) if (Nr(e.start.getTime(), e.end.getTime(), i, a) && !("kind" in e && e.kind === "unavailable")) for (let t of zr(e.resourceId)) r.add(t);
|
|
4010
4078
|
return r;
|
|
4011
4079
|
}
|
|
4012
|
-
function
|
|
4013
|
-
let { fromDateKey: r, wallDateAtMinutes: i, toDateKey: a, startOfWeek: o, startOfDay: s, addDays: c, differenceInDays: l, weekday: u } =
|
|
4080
|
+
function Ur(e, t, n = {}) {
|
|
4081
|
+
let { fromDateKey: r, wallDateAtMinutes: i, toDateKey: a, startOfWeek: o, startOfDay: s, addDays: c, differenceInDays: l, weekday: u } = Xr(n.timeZone), d = n.weekStartsOn ?? 1, f = [], p = t.start.getTime(), m = t.end.getTime();
|
|
4014
4082
|
for (let n of e) {
|
|
4015
|
-
let e =
|
|
4016
|
-
h <= e && (h +=
|
|
4083
|
+
let e = hr(n.startTime), h = hr(n.endTime);
|
|
4084
|
+
h <= e && (h += nr);
|
|
4017
4085
|
let g = r(n.startDate), _ = (t) => {
|
|
4018
4086
|
let r = i(t, e), o = i(t, h);
|
|
4019
|
-
if (o <= r || !
|
|
4087
|
+
if (o <= r || !Nr(r.getTime(), o.getTime(), p, m)) return;
|
|
4020
4088
|
let s = a(t);
|
|
4021
4089
|
f.push({
|
|
4022
4090
|
id: n.recurrence ? `${n.id}@${s}` : n.id,
|
|
@@ -4045,40 +4113,40 @@ function Lr(e, t, n = {}) {
|
|
|
4045
4113
|
}
|
|
4046
4114
|
return f.sort((e, t) => e.start.getTime() - t.start.getTime());
|
|
4047
4115
|
}
|
|
4048
|
-
function
|
|
4049
|
-
let a =
|
|
4050
|
-
return u <= l && (u = new Date(l.getTime() + r *
|
|
4116
|
+
function Wr(e, t, n, r, i) {
|
|
4117
|
+
let a = yr(t, r, "floor"), o = yr(n, r, "floor"), s = $(Math.min(a, o), i.min, i.max - r), c = $(Math.max(a, o) + r, s + r, i.max), l = pr(e, s), u = pr(e, c);
|
|
4118
|
+
return u <= l && (u = new Date(l.getTime() + r * rr)), {
|
|
4051
4119
|
start: l,
|
|
4052
4120
|
end: u
|
|
4053
4121
|
};
|
|
4054
4122
|
}
|
|
4055
|
-
function
|
|
4056
|
-
let o = (e.end.getTime() - e.start.getTime()) /
|
|
4123
|
+
function Gr(e, t, n, r, i, a) {
|
|
4124
|
+
let o = (e.end.getTime() - e.start.getTime()) / rr, s = yr(n - r, i), c = fr(e.start);
|
|
4057
4125
|
c >= a.min && c + o <= a.max && (s = $(s, a.min, a.max - o));
|
|
4058
|
-
let l =
|
|
4126
|
+
let l = mr(t, s);
|
|
4059
4127
|
return {
|
|
4060
4128
|
start: l,
|
|
4061
|
-
end: new Date(l.getTime() + o *
|
|
4129
|
+
end: new Date(l.getTime() + o * rr)
|
|
4062
4130
|
};
|
|
4063
4131
|
}
|
|
4064
|
-
function
|
|
4065
|
-
let a =
|
|
4066
|
-
return
|
|
4132
|
+
function Kr(e, t, n, r, i) {
|
|
4133
|
+
let a = ar(t), o = e.start.getTime() >= a.getTime() ? fr(e.start) + r : r;
|
|
4134
|
+
return pr(a, $(yr(n, r), Math.min(o, nr), Math.max(i.max, o)));
|
|
4067
4135
|
}
|
|
4068
|
-
function
|
|
4136
|
+
function qr(e, t) {
|
|
4069
4137
|
return {
|
|
4070
4138
|
start: Q(e.start, t),
|
|
4071
4139
|
end: Q(e.end, t)
|
|
4072
4140
|
};
|
|
4073
4141
|
}
|
|
4074
|
-
function
|
|
4142
|
+
function Jr(e, t) {
|
|
4075
4143
|
return e.start.getTime() === t.start.getTime() && e.end.getTime() === t.end.getTime();
|
|
4076
4144
|
}
|
|
4077
|
-
function
|
|
4145
|
+
function Yr(e) {
|
|
4078
4146
|
return e.allDay ? !0 : e.end.getTime() >= Q(e.start, 1).getTime();
|
|
4079
4147
|
}
|
|
4080
|
-
function
|
|
4081
|
-
let t = (t) => Z(t, e), n = (t) =>
|
|
4148
|
+
function Xr(e) {
|
|
4149
|
+
let t = (t) => Z(t, e), n = (t) => tr(t, e), r = (e) => {
|
|
4082
4150
|
let n = t(e);
|
|
4083
4151
|
return `${String(n.year).padStart(4, "0")}-${String(n.month).padStart(2, "0")}-${String(n.day).padStart(2, "0")}`;
|
|
4084
4152
|
}, i = (e) => n({
|
|
@@ -4114,7 +4182,7 @@ function Wr(e) {
|
|
|
4114
4182
|
let r = t(e), i = t(n);
|
|
4115
4183
|
return Math.round((Date.UTC(r.year, r.month - 1, r.day) - Date.UTC(i.year, i.month - 1, i.day)) / 864e5);
|
|
4116
4184
|
}, d = (e, r) => {
|
|
4117
|
-
let i = t(e), a = new Date(Date.UTC(i.year, i.month - 1, i.day, 0, Math.floor(r), 0, Math.round((r - Math.floor(r)) *
|
|
4185
|
+
let i = t(e), a = new Date(Date.UTC(i.year, i.month - 1, i.day, 0, Math.floor(r), 0, Math.round((r - Math.floor(r)) * rr)));
|
|
4118
4186
|
return n({
|
|
4119
4187
|
year: a.getUTCFullYear(),
|
|
4120
4188
|
month: a.getUTCMonth() + 1,
|
|
@@ -4126,11 +4194,11 @@ function Wr(e) {
|
|
|
4126
4194
|
});
|
|
4127
4195
|
}, f = (e, n) => {
|
|
4128
4196
|
let r = t(e);
|
|
4129
|
-
return u(e, n) *
|
|
4197
|
+
return u(e, n) * nr + r.hour * 60 + r.minute + r.second / 60 + r.millisecond / rr;
|
|
4130
4198
|
}, p = (t, n) => {
|
|
4131
4199
|
let r = d(t, n), i = f(r, t);
|
|
4132
4200
|
if (!e || i <= n + 1e-8) return r;
|
|
4133
|
-
let a = Math.floor(r.getTime() - (i - n) *
|
|
4201
|
+
let a = Math.floor(r.getTime() - (i - n) * rr), o = r.getTime();
|
|
4134
4202
|
for (; a < o;) {
|
|
4135
4203
|
let e = Math.floor((a + o) / 2);
|
|
4136
4204
|
f(new Date(e), t) < n ? a = e + 1 : o = e;
|
|
@@ -4138,7 +4206,7 @@ function Wr(e) {
|
|
|
4138
4206
|
return new Date(o);
|
|
4139
4207
|
}, m = (e) => {
|
|
4140
4208
|
if (!Number.isFinite(e.min) || !Number.isFinite(e.max) || e.max <= e.min) throw RangeError("Calendar time bounds must contain a positive interval of real instants");
|
|
4141
|
-
}, h = e ? (e, t) => new Date(i(e).getTime() + t *
|
|
4209
|
+
}, h = e ? (e, t) => new Date(i(e).getTime() + t * rr) : mr, g = e ? (e) => (e.getTime() - i(e).getTime()) / rr : fr, _ = e ? (e, t) => new Date(e.getTime() + t * rr) : or, v = (e) => {
|
|
4142
4210
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
|
|
4143
4211
|
if (!t) throw RangeError(`Invalid date key "${e}"`);
|
|
4144
4212
|
let i = n({
|
|
@@ -4162,21 +4230,21 @@ function Wr(e) {
|
|
|
4162
4230
|
if (e === "week" || e === "workWeek") {
|
|
4163
4231
|
let t = c(r, n.weekStartsOn), i = Array.from({ length: 7 }, (e, n) => a(t, n));
|
|
4164
4232
|
if (e === "week") return i;
|
|
4165
|
-
let o = new Set(n.workWeekDays ??
|
|
4233
|
+
let o = new Set(n.workWeekDays ?? ir), l = i.filter((e) => o.has(s(e)));
|
|
4166
4234
|
return l.length ? l : [r];
|
|
4167
4235
|
}
|
|
4168
4236
|
let o = e === "threeDay" ? 3 : e === "agenda" ? Math.max(1, Math.floor(n.agendaDays ?? 7)) : 1;
|
|
4169
4237
|
return Array.from({ length: o }, (e, t) => a(r, t));
|
|
4170
4238
|
}, x = (t, n, r) => {
|
|
4171
|
-
if (!e) return
|
|
4239
|
+
if (!e) return Pr(t, n, r);
|
|
4172
4240
|
let o = i(r).getTime(), s = a(i(r), 1).getTime(), c = t.getTime(), l = Math.max(c, n.getTime());
|
|
4173
|
-
return (l === c ? c < o || c >= s : !
|
|
4174
|
-
startMinute: Math.max(0, (c - o) /
|
|
4175
|
-
endMinute: Math.min(s - o, l - o) /
|
|
4241
|
+
return (l === c ? c < o || c >= s : !Nr(c, l, o, s)) ? null : {
|
|
4242
|
+
startMinute: Math.max(0, (c - o) / rr),
|
|
4243
|
+
endMinute: Math.min(s - o, l - o) / rr,
|
|
4176
4244
|
continuesBefore: c < o,
|
|
4177
4245
|
continuesAfter: l > s
|
|
4178
4246
|
};
|
|
4179
|
-
}, S = (e) => !!e.allDay || e.end >= a(e.start, 1), C = (t, n) =>
|
|
4247
|
+
}, S = (e) => !!e.allDay || e.end >= a(e.start, 1), C = (t, n) => Dr(t, {
|
|
4180
4248
|
...n,
|
|
4181
4249
|
...e ? { timeZone: e } : {}
|
|
4182
4250
|
}), w = (e, t = "en-GB") => C(t, {
|
|
@@ -4185,7 +4253,7 @@ function Wr(e) {
|
|
|
4185
4253
|
month: "long",
|
|
4186
4254
|
year: "numeric"
|
|
4187
4255
|
}).format(e), T = (n, r, i = {}) => {
|
|
4188
|
-
if (!e) return
|
|
4256
|
+
if (!e) return Mr(n, r, i);
|
|
4189
4257
|
let a = i.locale ?? "en-GB";
|
|
4190
4258
|
if (n === "month") return C(a, {
|
|
4191
4259
|
month: "long",
|
|
@@ -4208,11 +4276,11 @@ function Wr(e) {
|
|
|
4208
4276
|
year: "numeric"
|
|
4209
4277
|
}).format(c)}`;
|
|
4210
4278
|
}, E = (n, r, i, a, o, s) => {
|
|
4211
|
-
if (!e) return
|
|
4279
|
+
if (!e) return Gr(n, r, i, a, o, s);
|
|
4212
4280
|
m(s);
|
|
4213
|
-
let c = (n.end.getTime() - n.start.getTime()) /
|
|
4281
|
+
let c = (n.end.getTime() - n.start.getTime()) / rr, l = yr(i - a, o), f = (e) => {
|
|
4214
4282
|
let n = h(r, e), i = t(n);
|
|
4215
|
-
return u(n, r) *
|
|
4283
|
+
return u(n, r) * nr + i.hour * 60 + i.minute;
|
|
4216
4284
|
}, p = d(n.start, f(s.min)), g = d(n.start, f(s.max));
|
|
4217
4285
|
n.start >= p && n.end <= g && c <= s.max - s.min && (l = $(l, s.min, s.max - c));
|
|
4218
4286
|
let v = h(r, l);
|
|
@@ -4254,8 +4322,8 @@ function Wr(e) {
|
|
|
4254
4322
|
isAllDayLike: S,
|
|
4255
4323
|
eventsOnDay: (e, t) => e.filter((e) => x(e.start, e.end, t)).sort((e, t) => Number(S(t)) - Number(S(e)) || e.start.getTime() - t.start.getTime() || t.end.getTime() - e.end.getTime() || e.title.localeCompare(t.title)),
|
|
4256
4324
|
computeCreateRange: (t, n, r, i, a) => {
|
|
4257
|
-
if (!e) return
|
|
4258
|
-
let o =
|
|
4325
|
+
if (!e) return Wr(t, n, r, i, a);
|
|
4326
|
+
let o = yr(n, i, "floor"), s = yr(r, i, "floor");
|
|
4259
4327
|
m(a);
|
|
4260
4328
|
let c = Math.min(i, a.max - a.min), l = $(Math.min(o, s), a.min, a.max - c);
|
|
4261
4329
|
return {
|
|
@@ -4265,14 +4333,14 @@ function Wr(e) {
|
|
|
4265
4333
|
},
|
|
4266
4334
|
computeMoveRange: E,
|
|
4267
4335
|
computeResizeEnd: (t, n, r, a, o) => {
|
|
4268
|
-
if (!e) return
|
|
4336
|
+
if (!e) return Kr(t, n, r, a, o);
|
|
4269
4337
|
m(o);
|
|
4270
|
-
let s = Math.max(0, (t.start.getTime() - i(n).getTime()) /
|
|
4271
|
-
return h(n, $(
|
|
4338
|
+
let s = Math.max(0, (t.start.getTime() - i(n).getTime()) / rr) + a;
|
|
4339
|
+
return h(n, $(yr(r, a), s, Math.max(o.max, s)));
|
|
4272
4340
|
},
|
|
4273
4341
|
computeNudgeRange: (e, t, n) => E(e, i(e.start), g(e.start) + t, 0, 1, n),
|
|
4274
4342
|
shiftRangeDays: (t, n) => {
|
|
4275
|
-
if (!e) return
|
|
4343
|
+
if (!e) return qr(t, n);
|
|
4276
4344
|
if (t.allDay) return {
|
|
4277
4345
|
start: a(t.start, n),
|
|
4278
4346
|
end: a(t.end, n)
|
|
@@ -4286,8 +4354,8 @@ function Wr(e) {
|
|
|
4286
4354
|
dayBounds: (t, n) => {
|
|
4287
4355
|
if (!e) return n;
|
|
4288
4356
|
let r = i(t).getTime(), a = {
|
|
4289
|
-
min: (p(t, n.min).getTime() - r) /
|
|
4290
|
-
max: (p(t, n.max).getTime() - r) /
|
|
4357
|
+
min: (p(t, n.min).getTime() - r) / rr,
|
|
4358
|
+
max: (p(t, n.max).getTime() - r) / rr
|
|
4291
4359
|
};
|
|
4292
4360
|
return m(a), a;
|
|
4293
4361
|
}
|
|
@@ -4295,20 +4363,20 @@ function Wr(e) {
|
|
|
4295
4363
|
}
|
|
4296
4364
|
//#endregion
|
|
4297
4365
|
//#region src/components/ui/calendar/context.ts
|
|
4298
|
-
var
|
|
4299
|
-
function
|
|
4300
|
-
let e = c(
|
|
4366
|
+
var Zr = r(null);
|
|
4367
|
+
function Qr() {
|
|
4368
|
+
let e = c(Zr);
|
|
4301
4369
|
if (!e) throw Error("Calendar views must render inside <Calendar>");
|
|
4302
4370
|
return e;
|
|
4303
4371
|
}
|
|
4304
4372
|
//#endregion
|
|
4305
4373
|
//#region src/components/ui/calendar/AgendaView.tsx
|
|
4306
|
-
function
|
|
4307
|
-
let i =
|
|
4374
|
+
function $r({ days: e, events: t, availability: n, label: r }) {
|
|
4375
|
+
let i = Qr(), { daySegment: a, eventsOnDay: o, getFormatter: s, isAllDayLike: c, isSameDay: l, toDateKey: u } = i.dates, d = s(i.locale, {
|
|
4308
4376
|
weekday: "long",
|
|
4309
4377
|
day: "numeric",
|
|
4310
4378
|
month: "long"
|
|
4311
|
-
}), f = (e) =>
|
|
4379
|
+
}), f = (e) => zr(e).map((e) => i.resourceById.get(e)?.title).filter(Boolean).join(", ");
|
|
4312
4380
|
return /* @__PURE__ */ _("div", {
|
|
4313
4381
|
className: "ui-cal-scroll min-h-0 flex-1 overflow-y-auto",
|
|
4314
4382
|
"aria-label": r,
|
|
@@ -4345,10 +4413,10 @@ function qr({ days: e, events: t, availability: n, label: r }) {
|
|
|
4345
4413
|
children: i.labels.noEvents
|
|
4346
4414
|
}) : /* @__PURE__ */ _("ul", {
|
|
4347
4415
|
className: "divide-border divide-y border-border border-b",
|
|
4348
|
-
children: r.map((e) => /* @__PURE__ */ _("li", { children: e.type === "event" ? /* @__PURE__ */ _(
|
|
4416
|
+
children: r.map((e) => /* @__PURE__ */ _("li", { children: e.type === "event" ? /* @__PURE__ */ _(ei, {
|
|
4349
4417
|
event: e.value,
|
|
4350
4418
|
resources: f(e.value.resourceId)
|
|
4351
|
-
}) : /* @__PURE__ */ _(
|
|
4419
|
+
}) : /* @__PURE__ */ _(ti, {
|
|
4352
4420
|
block: e.value,
|
|
4353
4421
|
resources: f(e.value.resourceId)
|
|
4354
4422
|
}) }, `${e.type}:${e.value.id}`))
|
|
@@ -4357,8 +4425,8 @@ function qr({ days: e, events: t, availability: n, label: r }) {
|
|
|
4357
4425
|
})
|
|
4358
4426
|
});
|
|
4359
4427
|
}
|
|
4360
|
-
function
|
|
4361
|
-
let n =
|
|
4428
|
+
function ei({ event: e, resources: t }) {
|
|
4429
|
+
let n = Qr(), { isAllDayLike: r } = n.dates, i = n.statusLabel(e), a = r(e) ? n.labels.allDay : kr(e.start, e.end, n);
|
|
4362
4430
|
return /* @__PURE__ */ v("div", {
|
|
4363
4431
|
role: "button",
|
|
4364
4432
|
tabIndex: 0,
|
|
@@ -4405,8 +4473,8 @@ function Jr({ event: e, resources: t }) {
|
|
|
4405
4473
|
]
|
|
4406
4474
|
});
|
|
4407
4475
|
}
|
|
4408
|
-
function
|
|
4409
|
-
let n =
|
|
4476
|
+
function ti({ block: e, resources: t }) {
|
|
4477
|
+
let n = Qr(), r = e.kind ?? "available", i = r === "available" ? n.labels.available : n.labels.unavailable, a = n.hasBlockClick;
|
|
4410
4478
|
return /* @__PURE__ */ v("div", {
|
|
4411
4479
|
role: a ? "button" : void 0,
|
|
4412
4480
|
tabIndex: a ? 0 : void 0,
|
|
@@ -4419,7 +4487,7 @@ function Yr({ block: e, resources: t }) {
|
|
|
4419
4487
|
children: [
|
|
4420
4488
|
/* @__PURE__ */ _("span", {
|
|
4421
4489
|
className: "font-mono w-24 shrink-0",
|
|
4422
|
-
children:
|
|
4490
|
+
children: kr(e.start, e.end, n)
|
|
4423
4491
|
}),
|
|
4424
4492
|
/* @__PURE__ */ _("span", {
|
|
4425
4493
|
className: G("ui-cal-agenda-swatch mt-0.5", r === "unavailable" && "ui-cal-agenda-swatch-off"),
|
|
@@ -4438,12 +4506,12 @@ function Yr({ block: e, resources: t }) {
|
|
|
4438
4506
|
}
|
|
4439
4507
|
//#endregion
|
|
4440
4508
|
//#region src/components/ui/calendar/MonthView.tsx
|
|
4441
|
-
var
|
|
4442
|
-
function
|
|
4509
|
+
var ni = 96, ri = 224;
|
|
4510
|
+
function ii(e) {
|
|
4443
4511
|
return `${e.type}:${e.value.id}`;
|
|
4444
4512
|
}
|
|
4445
|
-
function
|
|
4446
|
-
let i =
|
|
4513
|
+
function ai({ date: e, events: t, availability: n, label: r }) {
|
|
4514
|
+
let i = Qr(), { addDays: a, daySegment: o, differenceInDays: c, eventsOnDay: u, formatLongDate: d, fromDateKey: g, getFormatter: y, getMonthWeeks: b, isAllDayLike: x, isSameDay: S, shiftRangeDays: C, toDateKey: w } = i.dates, T = p(() => b(e, i.weekStartsOn), [
|
|
4447
4515
|
e,
|
|
4448
4516
|
i.weekStartsOn,
|
|
4449
4517
|
b
|
|
@@ -4497,7 +4565,7 @@ function $r({ date: e, events: t, availability: n, label: r }) {
|
|
|
4497
4565
|
u,
|
|
4498
4566
|
o,
|
|
4499
4567
|
w
|
|
4500
|
-
]), ue = y(i.locale, { weekday: "short" }), de = i.monthMaxEvents ?? (ne ? Math.max(1, Math.floor((Math.max(ne / T.length,
|
|
4568
|
+
]), ue = y(i.locale, { weekday: "short" }), de = i.monthMaxEvents ?? (ne ? Math.max(1, Math.floor((Math.max(ne / T.length, ni) - 28) / 20)) : 3);
|
|
4501
4569
|
function U(e) {
|
|
4502
4570
|
let t = w(e);
|
|
4503
4571
|
k(t), requestAnimationFrame(() => {
|
|
@@ -4529,7 +4597,7 @@ function $r({ date: e, events: t, availability: n, label: r }) {
|
|
|
4529
4597
|
let n = {
|
|
4530
4598
|
action: "move",
|
|
4531
4599
|
...C(e.value, t),
|
|
4532
|
-
resourceIds:
|
|
4600
|
+
resourceIds: Vr(e.value.resourceId, void 0, void 0)
|
|
4533
4601
|
};
|
|
4534
4602
|
return e.type === "event" ? {
|
|
4535
4603
|
target: "event",
|
|
@@ -4551,7 +4619,7 @@ function $r({ date: e, events: t, availability: n, label: r }) {
|
|
|
4551
4619
|
if (!t || e.pointerId !== t.pointerId) return;
|
|
4552
4620
|
if (!t.started) {
|
|
4553
4621
|
if (Math.hypot(e.clientX - t.startX, e.clientY - t.startY) < 4) return;
|
|
4554
|
-
t.started = !0, L(
|
|
4622
|
+
t.started = !0, L(ii(t.item));
|
|
4555
4623
|
}
|
|
4556
4624
|
let n = document.elementFromPoint(e.clientX, e.clientY)?.closest("[data-cal-date]"), r = n && E.current?.contains(n) ? n.dataset.calDate ?? null : null;
|
|
4557
4625
|
t.overKey = r ?? void 0, F(r);
|
|
@@ -4604,7 +4672,7 @@ function $r({ date: e, events: t, availability: n, label: r }) {
|
|
|
4604
4672
|
}, "pointer");
|
|
4605
4673
|
}
|
|
4606
4674
|
let ye = (e, t) => {
|
|
4607
|
-
let n =
|
|
4675
|
+
let n = ii(e), r = e.value.placeholder ? {
|
|
4608
4676
|
"aria-hidden": !0,
|
|
4609
4677
|
"data-placeholder": !0
|
|
4610
4678
|
} : {
|
|
@@ -4624,7 +4692,7 @@ function $r({ date: e, events: t, availability: n, label: r }) {
|
|
|
4624
4692
|
...r,
|
|
4625
4693
|
children: [i.display.time && /* @__PURE__ */ _("span", {
|
|
4626
4694
|
className: "ui-cal-meta font-mono shrink-0",
|
|
4627
|
-
children:
|
|
4695
|
+
children: kr(t.start, t.end, i)
|
|
4628
4696
|
}), i.display.blockLabels && /* @__PURE__ */ _("span", {
|
|
4629
4697
|
className: "ui-cal-title",
|
|
4630
4698
|
children: t.label ?? ((t.kind ?? "available") === "available" ? i.labels.available : i.labels.unavailable)
|
|
@@ -4647,7 +4715,7 @@ function $r({ date: e, events: t, availability: n, label: r }) {
|
|
|
4647
4715
|
}),
|
|
4648
4716
|
!o && i.display.time && /* @__PURE__ */ _("span", {
|
|
4649
4717
|
className: "ui-cal-meta font-mono shrink-0",
|
|
4650
|
-
children:
|
|
4718
|
+
children: Or(a.start, i)
|
|
4651
4719
|
}),
|
|
4652
4720
|
/* @__PURE__ */ _("span", {
|
|
4653
4721
|
className: "ui-cal-title font-medium",
|
|
@@ -4709,7 +4777,7 @@ function $r({ date: e, events: t, availability: n, label: r }) {
|
|
|
4709
4777
|
onClick: (e) => {
|
|
4710
4778
|
let n = e.currentTarget.closest("[data-cal-date]")?.getBoundingClientRect();
|
|
4711
4779
|
if (n) {
|
|
4712
|
-
let e = Math.max(n.width,
|
|
4780
|
+
let e = Math.max(n.width, ri);
|
|
4713
4781
|
N({
|
|
4714
4782
|
top: Math.max(8, n.top),
|
|
4715
4783
|
left: Math.max(8, Math.min(n.left, window.innerWidth - e - 8)),
|
|
@@ -4752,8 +4820,8 @@ function $r({ date: e, events: t, availability: n, label: r }) {
|
|
|
4752
4820
|
}
|
|
4753
4821
|
//#endregion
|
|
4754
4822
|
//#region src/components/ui/calendar/items.tsx
|
|
4755
|
-
function
|
|
4756
|
-
let u =
|
|
4823
|
+
function oi({ event: e, style: t, resizeEdge: n, compact: r, dense: i, continuesBefore: a, continuesAfter: o, dragging: s, onKeyDown: c, onClick: l }) {
|
|
4824
|
+
let u = Qr(), d = u.canEditEvent(e), f = e.allDay ? u.labels.allDay : kr(e.start, e.end, u), { display: p } = u, m = p.status ? u.statusLabel(e) : void 0, h = [p.time && f, m].filter(Boolean).join(" · "), y = !!e.placeholder, b = u.renderEvent?.(e, {
|
|
4757
4825
|
view: u.view,
|
|
4758
4826
|
compact: r,
|
|
4759
4827
|
timeLabel: f,
|
|
@@ -4784,7 +4852,7 @@ function ei({ event: e, style: t, resizeEdge: n, compact: r, dense: i, continues
|
|
|
4784
4852
|
}), h && /* @__PURE__ */ _("span", {
|
|
4785
4853
|
className: "ui-cal-meta font-mono",
|
|
4786
4854
|
children: h
|
|
4787
|
-
})] }) : /* @__PURE__ */ _(
|
|
4855
|
+
})] }) : /* @__PURE__ */ _(si, {
|
|
4788
4856
|
event: e,
|
|
4789
4857
|
compact: r,
|
|
4790
4858
|
timeLabel: p.time ? f : void 0,
|
|
@@ -4799,7 +4867,7 @@ function ei({ event: e, style: t, resizeEdge: n, compact: r, dense: i, continues
|
|
|
4799
4867
|
})]
|
|
4800
4868
|
});
|
|
4801
4869
|
}
|
|
4802
|
-
function
|
|
4870
|
+
function si({ event: e, compact: t, timeLabel: n, statusLabel: r, description: i, badge: a }) {
|
|
4803
4871
|
return t ? /* @__PURE__ */ v("div", {
|
|
4804
4872
|
className: "flex min-w-0 items-center gap-1",
|
|
4805
4873
|
children: [/* @__PURE__ */ v("span", {
|
|
@@ -4837,8 +4905,8 @@ function ti({ event: e, compact: t, timeLabel: n, statusLabel: r, description: i
|
|
|
4837
4905
|
})
|
|
4838
4906
|
] });
|
|
4839
4907
|
}
|
|
4840
|
-
function
|
|
4841
|
-
let s =
|
|
4908
|
+
function ci({ block: e, style: t, resizeEdge: n, continuesAfter: r, dragging: i, onKeyDown: a, onClick: o }) {
|
|
4909
|
+
let s = Qr(), c = s.editLayer === "availability", l = c && s.canEditBlock(e), u = e.kind ?? "available", d = e.label ?? (u === "available" ? s.labels.available : s.labels.unavailable), f = c && !e.placeholder && (l || s.hasBlockClick);
|
|
4842
4910
|
return u === "available" && !c && !s.display.availableBlocks ? null : /* @__PURE__ */ v("div", {
|
|
4843
4911
|
role: f ? "button" : void 0,
|
|
4844
4912
|
tabIndex: f ? 0 : void 0,
|
|
@@ -4863,7 +4931,7 @@ function ni({ block: e, style: t, resizeEdge: n, continuesAfter: r, dragging: i,
|
|
|
4863
4931
|
}),
|
|
4864
4932
|
c && s.display.time && /* @__PURE__ */ _("span", {
|
|
4865
4933
|
className: "ui-cal-meta font-mono block",
|
|
4866
|
-
children:
|
|
4934
|
+
children: kr(e.start, e.end, s)
|
|
4867
4935
|
}),
|
|
4868
4936
|
n && l && !r && /* @__PURE__ */ _("div", {
|
|
4869
4937
|
"data-cal-resize": !0,
|
|
@@ -4874,8 +4942,8 @@ function ni({ block: e, style: t, resizeEdge: n, continuesAfter: r, dragging: i,
|
|
|
4874
4942
|
]
|
|
4875
4943
|
});
|
|
4876
4944
|
}
|
|
4877
|
-
function
|
|
4878
|
-
let r =
|
|
4945
|
+
function li({ draft: e, invalid: t, style: n }) {
|
|
4946
|
+
let r = Qr(), i = e.target === "event" ? e.event.title : e.target === "availability" ? e.availability.label ?? r.labels.available : void 0;
|
|
4879
4947
|
return /* @__PURE__ */ v("div", {
|
|
4880
4948
|
className: "ui-cal-ghost",
|
|
4881
4949
|
"data-invalid": t ? !0 : void 0,
|
|
@@ -4888,7 +4956,7 @@ function ri({ draft: e, invalid: t, style: n }) {
|
|
|
4888
4956
|
}),
|
|
4889
4957
|
/* @__PURE__ */ _("div", {
|
|
4890
4958
|
className: "font-mono",
|
|
4891
|
-
children:
|
|
4959
|
+
children: kr(e.start, e.end, r)
|
|
4892
4960
|
}),
|
|
4893
4961
|
t && /* @__PURE__ */ _("div", {
|
|
4894
4962
|
className: "text-red font-medium",
|
|
@@ -4899,15 +4967,15 @@ function ri({ draft: e, invalid: t, style: n }) {
|
|
|
4899
4967
|
}
|
|
4900
4968
|
//#endregion
|
|
4901
4969
|
//#region src/components/ui/calendar/useGridInteraction.ts
|
|
4902
|
-
var
|
|
4903
|
-
function
|
|
4904
|
-
let a =
|
|
4970
|
+
var ui = 4, di = 10, fi = 36;
|
|
4971
|
+
function pi(e, t, n, r, i) {
|
|
4972
|
+
let a = zr(e.value.resourceId).length > 0, o = {
|
|
4905
4973
|
action: t,
|
|
4906
4974
|
start: n.start,
|
|
4907
4975
|
end: n.end,
|
|
4908
4976
|
resourceId: a ? i : void 0,
|
|
4909
4977
|
previousResourceId: a ? r : void 0,
|
|
4910
|
-
resourceIds:
|
|
4978
|
+
resourceIds: Vr(e.value.resourceId, r, i)
|
|
4911
4979
|
};
|
|
4912
4980
|
return e.type === "event" ? {
|
|
4913
4981
|
target: "event",
|
|
@@ -4919,11 +4987,11 @@ function si(e, t, n, r, i) {
|
|
|
4919
4987
|
...o
|
|
4920
4988
|
};
|
|
4921
4989
|
}
|
|
4922
|
-
function
|
|
4923
|
-
return t.target === "selection" ? !1 :
|
|
4990
|
+
function mi(e, t) {
|
|
4991
|
+
return t.target === "selection" ? !1 : Jr(e.value, t) && (t.resourceId === void 0 || t.resourceId === t.previousResourceId);
|
|
4924
4992
|
}
|
|
4925
|
-
function
|
|
4926
|
-
let s =
|
|
4993
|
+
function hi({ axis: e, columns: t, pxPerMinute: n, scrollRef: r, events: i, blocks: a, initialColumn: o }) {
|
|
4994
|
+
let s = Qr(), { addMinutes: c, computeNudgeRange: u, dateAtMinutes: d, differenceInDays: p, shiftRangeDays: g } = s.dates, [_, v] = h(null), [y, b] = h(null), x = m(null), S = m({
|
|
4927
4995
|
ctx: s,
|
|
4928
4996
|
columns: t,
|
|
4929
4997
|
axis: e,
|
|
@@ -4989,12 +5057,12 @@ function li({ axis: e, columns: t, pxPerMinute: n, scrollRef: r, events: i, bloc
|
|
|
4989
5057
|
if (!r) return;
|
|
4990
5058
|
e.hover = r.index;
|
|
4991
5059
|
let a = n[r.index], c = i(e.item.value, a.day, T(r.el, e.lastX, e.lastY), e.grabOffset, o, t.dayBounds(a.day));
|
|
4992
|
-
l =
|
|
5060
|
+
l = pi(e.item, "move", c, s.resourceId, a.resourceId);
|
|
4993
5061
|
} else if (e.kind === "resize" && e.item) {
|
|
4994
5062
|
let t = w(e.origin);
|
|
4995
5063
|
if (!t) return;
|
|
4996
5064
|
let n = a(e.item.value, s.day, T(t, e.lastX, e.lastY), o, c);
|
|
4997
|
-
l =
|
|
5065
|
+
l = pi(e.item, "resize", {
|
|
4998
5066
|
start: e.item.value.start,
|
|
4999
5067
|
end: n
|
|
5000
5068
|
}, s.resourceId, s.resourceId);
|
|
@@ -5009,7 +5077,7 @@ function li({ axis: e, columns: t, pxPerMinute: n, scrollRef: r, events: i, bloc
|
|
|
5009
5077
|
let t = r.current;
|
|
5010
5078
|
if (!t || !e.started) return;
|
|
5011
5079
|
let n = t.getBoundingClientRect(), i = 0, a = 0;
|
|
5012
|
-
if (e.lastY < n.top +
|
|
5080
|
+
if (e.lastY < n.top + fi ? a = -1 : e.lastY > n.bottom - fi && (a = 1), e.lastX < n.left + fi ? i = -1 : e.lastX > n.right - fi && (i = 1), !i && !a) {
|
|
5013
5081
|
e.frame = void 0;
|
|
5014
5082
|
return;
|
|
5015
5083
|
}
|
|
@@ -5022,7 +5090,7 @@ function li({ axis: e, columns: t, pxPerMinute: n, scrollRef: r, events: i, bloc
|
|
|
5022
5090
|
if (a && (x.current = null, a.cleanup(), a.frame && cancelAnimationFrame(a.frame), v(null), e)) {
|
|
5023
5091
|
if (a.started) {
|
|
5024
5092
|
let e = a.current;
|
|
5025
|
-
if (!e || a.item &&
|
|
5093
|
+
if (!e || a.item && mi(a.item, e.draft)) return;
|
|
5026
5094
|
t.commit(e.draft, "pointer");
|
|
5027
5095
|
return;
|
|
5028
5096
|
}
|
|
@@ -5034,7 +5102,7 @@ function li({ axis: e, columns: t, pxPerMinute: n, scrollRef: r, events: i, bloc
|
|
|
5034
5102
|
if (a.kind === "create") {
|
|
5035
5103
|
let e = n[a.origin];
|
|
5036
5104
|
if (!e) return;
|
|
5037
|
-
let o = t.dayBounds(e.day), s = Math.min(i, o.max - o.min), c = $(
|
|
5105
|
+
let o = t.dayBounds(e.day), s = Math.min(i, o.max - o.min), c = $(yr(a.anchorMinute, i, "floor"), o.min, o.max - s), l = Math.min(c + Math.max(i, t.clickCreateDuration), o.max);
|
|
5038
5106
|
t.commit({
|
|
5039
5107
|
target: "selection",
|
|
5040
5108
|
action: "create",
|
|
@@ -5084,11 +5152,11 @@ function li({ axis: e, columns: t, pxPerMinute: n, scrollRef: r, events: i, bloc
|
|
|
5084
5152
|
let n = Math.hypot(e.clientX - t.startX, e.clientY - t.startY);
|
|
5085
5153
|
if (!t.started) {
|
|
5086
5154
|
if (t.pointerType === "touch") {
|
|
5087
|
-
n >
|
|
5155
|
+
n > di && (t.moved = !0);
|
|
5088
5156
|
return;
|
|
5089
5157
|
}
|
|
5090
|
-
if (t.kind === "click" || n <
|
|
5091
|
-
n >=
|
|
5158
|
+
if (t.kind === "click" || n < ui) {
|
|
5159
|
+
n >= ui && (t.moved = !0);
|
|
5092
5160
|
return;
|
|
5093
5161
|
}
|
|
5094
5162
|
t.started = !0, r.current?.setPointerCapture?.(t.pointerId);
|
|
@@ -5147,17 +5215,17 @@ function li({ axis: e, columns: t, pxPerMinute: n, scrollRef: r, events: i, bloc
|
|
|
5147
5215
|
if (n.shiftKey) {
|
|
5148
5216
|
let t = c(d.end, e);
|
|
5149
5217
|
if (t.getTime() - d.start.getTime() < C * 6e4) return;
|
|
5150
|
-
v =
|
|
5218
|
+
v = pi(f, "resize", {
|
|
5151
5219
|
start: d.start,
|
|
5152
5220
|
end: t
|
|
5153
5221
|
}, _.resourceId, _.resourceId);
|
|
5154
|
-
} else v =
|
|
5222
|
+
} else v = pi(f, "move", u(d, e, s.dayBounds(d.start)), _.resourceId, _.resourceId);
|
|
5155
5223
|
} else if (h.includes(n.key) && !n.shiftKey) {
|
|
5156
5224
|
let e = t[l + (n.key === h[0] ? -1 : 1)];
|
|
5157
5225
|
if (!e) return;
|
|
5158
|
-
v =
|
|
5226
|
+
v = pi(f, "move", g(d, p(e.day, _.day)), _.resourceId, e.resourceId);
|
|
5159
5227
|
}
|
|
5160
|
-
v && (n.preventDefault(), !
|
|
5228
|
+
v && (n.preventDefault(), !mi(f, v) && s.commit(v, "keyboard") && j(o));
|
|
5161
5229
|
}
|
|
5162
5230
|
function N(e) {
|
|
5163
5231
|
if (e.target !== e.currentTarget || y) return;
|
|
@@ -5168,7 +5236,7 @@ function li({ axis: e, columns: t, pxPerMinute: n, scrollRef: r, events: i, bloc
|
|
|
5168
5236
|
t && b(P());
|
|
5169
5237
|
}
|
|
5170
5238
|
function P() {
|
|
5171
|
-
let e = t[$(o, 0, Math.max(0, t.length - 1))], n = e ? s.dayBounds(e.day) : s.bounds, r = Math.min(C, n.max - n.min), i = $(
|
|
5239
|
+
let e = t[$(o, 0, Math.max(0, t.length - 1))], n = e ? s.dayBounds(e.day) : s.bounds, r = Math.min(C, n.max - n.min), i = $(yr((e && s.timeZone && s.scrollToMinute !== void 0 ? s.dates.minutesOfDay(s.dates.wallDateAtMinutes(e.day, s.scrollToMinute)) : s.scrollToMinute) ?? n.min, C, "floor"), n.min, n.max - r);
|
|
5172
5240
|
return {
|
|
5173
5241
|
column: $(o, 0, Math.max(0, t.length - 1)),
|
|
5174
5242
|
start: i,
|
|
@@ -5287,12 +5355,12 @@ function li({ axis: e, columns: t, pxPerMinute: n, scrollRef: r, events: i, bloc
|
|
|
5287
5355
|
}
|
|
5288
5356
|
//#endregion
|
|
5289
5357
|
//#region src/components/ui/calendar/TimeGrid.tsx
|
|
5290
|
-
var
|
|
5291
|
-
function
|
|
5358
|
+
var gi = 22, _i = 3, vi = 18, yi = 36;
|
|
5359
|
+
function bi(e) {
|
|
5292
5360
|
let t = e.querySelector(".ui-cal-head")?.offsetHeight ?? 0;
|
|
5293
5361
|
return (e.clientHeight - t) / 2;
|
|
5294
5362
|
}
|
|
5295
|
-
function
|
|
5363
|
+
function xi(e, t, n, r, i) {
|
|
5296
5364
|
let a = i(e.start, e.end, t);
|
|
5297
5365
|
return a ? a.endMinute <= n && a.startMinute < n ? "before" : a.startMinute >= r ? "after" : {
|
|
5298
5366
|
item: e,
|
|
@@ -5302,8 +5370,8 @@ function hi(e, t, n, r, i) {
|
|
|
5302
5370
|
continuesAfter: a.continuesAfter || a.endMinute > r
|
|
5303
5371
|
} : null;
|
|
5304
5372
|
}
|
|
5305
|
-
function
|
|
5306
|
-
let i =
|
|
5373
|
+
function Si({ days: e, events: t, availability: n, label: r }) {
|
|
5374
|
+
let i = Qr(), { daySegment: a, formatLongDate: o, getFormatter: s, isAllDayLike: c, isSameDay: d, minutesOfDay: g, toDateKey: y } = i.dates, { bounds: b, resources: x, hourHeight: S } = i, C = S / 60, w = m(null), T = u(), [E, D] = h(!1), O = p(() => e.flatMap((e) => x.length ? x.map((t) => ({
|
|
5307
5375
|
key: `${y(e)}|${t.id}`,
|
|
5308
5376
|
day: e,
|
|
5309
5377
|
bounds: i.dates.dayBounds(e, i.bounds),
|
|
@@ -5318,7 +5386,7 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5318
5386
|
y,
|
|
5319
5387
|
i.dates,
|
|
5320
5388
|
i.bounds
|
|
5321
|
-
]), k = p(() => new Map(t.map((e) => [e.id, e])), [t]), A = p(() => new Map(n.map((e) => [e.id, e])), [n]), j = O.findIndex((e) => d(e.day, i.now)), M =
|
|
5389
|
+
]), k = p(() => new Map(t.map((e) => [e.id, e])), [t]), A = p(() => new Map(n.map((e) => [e.id, e])), [n]), j = O.findIndex((e) => d(e.day, i.now)), M = hi({
|
|
5322
5390
|
axis: "y",
|
|
5323
5391
|
columns: O,
|
|
5324
5392
|
pxPerMinute: C,
|
|
@@ -5327,30 +5395,30 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5327
5395
|
blocks: A,
|
|
5328
5396
|
initialColumn: Math.max(0, j)
|
|
5329
5397
|
}), { drag: N, cursor: P } = M, F = i.editLayer === "availability", I = p(() => {
|
|
5330
|
-
let e = t.filter((e) => !c(e)), r =
|
|
5398
|
+
let e = t.filter((e) => !c(e)), r = vi / C;
|
|
5331
5399
|
return O.map((t) => {
|
|
5332
5400
|
let o = t.bounds ?? i.bounds, s = 0, c = 0, l = [];
|
|
5333
5401
|
for (let n of e) {
|
|
5334
|
-
if (!
|
|
5335
|
-
let e =
|
|
5402
|
+
if (!Br(n.resourceId, t.resourceId, { emptyMatchesAll: !1 })) continue;
|
|
5403
|
+
let e = xi(n, t.day, o.min, o.max, a);
|
|
5336
5404
|
e === "before" ? s++ : e === "after" ? c++ : e && l.push(e);
|
|
5337
5405
|
}
|
|
5338
|
-
let u =
|
|
5406
|
+
let u = Lr(l.map((e) => ({
|
|
5339
5407
|
id: e.item.id,
|
|
5340
5408
|
start: e.start,
|
|
5341
5409
|
end: e.end
|
|
5342
5410
|
})), r), d = [];
|
|
5343
5411
|
for (let e of n) {
|
|
5344
|
-
if (!
|
|
5345
|
-
let n =
|
|
5412
|
+
if (!Br(e.resourceId, t.resourceId, { emptyMatchesAll: !0 })) continue;
|
|
5413
|
+
let n = xi(e, t.day, o.min, o.max, a);
|
|
5346
5414
|
n && typeof n == "object" && d.push(n);
|
|
5347
5415
|
}
|
|
5348
|
-
let f = F ?
|
|
5416
|
+
let f = F ? Lr(d.map((e) => ({
|
|
5349
5417
|
id: e.item.id,
|
|
5350
5418
|
start: e.start,
|
|
5351
5419
|
end: e.end
|
|
5352
5420
|
})), r) : null, p = [];
|
|
5353
|
-
return i.hasAvailability && i.shadeOutsideAvailability && (p =
|
|
5421
|
+
return i.hasAvailability && i.shadeOutsideAvailability && (p = Ir(o.min, o.max, d.map((e) => [e.start, e.end]))), {
|
|
5354
5422
|
placed: l,
|
|
5355
5423
|
layout: u,
|
|
5356
5424
|
blocks: d,
|
|
@@ -5377,7 +5445,7 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5377
5445
|
if (!c(n)) continue;
|
|
5378
5446
|
let t = -1;
|
|
5379
5447
|
O.forEach((r, i) => {
|
|
5380
|
-
let o = a(n.start, n.end, r.day) !== null &&
|
|
5448
|
+
let o = a(n.start, n.end, r.day) !== null && Br(n.resourceId, r.resourceId, { emptyMatchesAll: !1 });
|
|
5381
5449
|
o && t === -1 && (t = i);
|
|
5382
5450
|
let s = i === O.length - 1;
|
|
5383
5451
|
if (t !== -1 && (!o || s)) {
|
|
@@ -5391,7 +5459,7 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5391
5459
|
}
|
|
5392
5460
|
});
|
|
5393
5461
|
}
|
|
5394
|
-
let { lanes: n, count: r } =
|
|
5462
|
+
let { lanes: n, count: r } = Rr(e);
|
|
5395
5463
|
return {
|
|
5396
5464
|
runs: e,
|
|
5397
5465
|
lanes: n,
|
|
@@ -5402,12 +5470,12 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5402
5470
|
O,
|
|
5403
5471
|
a,
|
|
5404
5472
|
c
|
|
5405
|
-
]), R = E ? L.count : Math.min(L.count,
|
|
5473
|
+
]), R = E ? L.count : Math.min(L.count, _i), ee = L.runs.filter((e) => (L.lanes.get(e.id) ?? 0) >= R).length, te = m(C), ne = m(null);
|
|
5406
5474
|
l(() => {
|
|
5407
5475
|
let e = w.current;
|
|
5408
5476
|
if (!e) return;
|
|
5409
5477
|
let t = () => {
|
|
5410
|
-
ne.current = (e.scrollTop +
|
|
5478
|
+
ne.current = (e.scrollTop + bi(e)) / te.current;
|
|
5411
5479
|
};
|
|
5412
5480
|
return e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
|
|
5413
5481
|
}, []), f(() => {
|
|
@@ -5415,7 +5483,7 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5415
5483
|
if (!e || te.current === C) return;
|
|
5416
5484
|
te.current = C;
|
|
5417
5485
|
let t = ne.current;
|
|
5418
|
-
t !== null && (e.scrollTop = Math.max(0, t * C -
|
|
5486
|
+
t !== null && (e.scrollTop = Math.max(0, t * C - bi(e)));
|
|
5419
5487
|
}, [C]);
|
|
5420
5488
|
let re = m(null), z = i.scrollToMinute, { dates: ie, timeZone: ae, now: B } = i, oe = i.scrollAlign;
|
|
5421
5489
|
l(() => {
|
|
@@ -5423,7 +5491,7 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5423
5491
|
if (!t || re.current === i.view) return;
|
|
5424
5492
|
re.current = i.view;
|
|
5425
5493
|
let n = e.find((e) => d(e, B)) ?? e[0], r = ae ? ie.minutesOfDay(ie.wallDateAtMinutes(n, z ?? 480)) : z ?? 480, a = ie.dayBounds(n, b), o = t.querySelector(".ui-cal-head"), s = () => {
|
|
5426
|
-
let e = oe === "center" ?
|
|
5494
|
+
let e = oe === "center" ? bi(t) : 8;
|
|
5427
5495
|
t.scrollTop = Math.max(0, (r - a.min) * C - e);
|
|
5428
5496
|
};
|
|
5429
5497
|
if (s(), typeof ResizeObserver > "u") return;
|
|
@@ -5469,7 +5537,7 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5469
5537
|
let e = O[P.column];
|
|
5470
5538
|
if (e) {
|
|
5471
5539
|
let t = e.resourceId ? i.resourceById.get(e.resourceId) : void 0;
|
|
5472
|
-
ge = `${o(e.day, i.locale)}, ${i.timeZone ?
|
|
5540
|
+
ge = `${o(e.day, i.locale)}, ${i.timeZone ? Or(i.dates.dateAtMinutes(e.day, P.start), i) : gr(P.start)} to ${i.timeZone ? Or(i.dates.dateAtMinutes(e.day, P.end), i) : gr(P.end)}${t ? `, ${t.title}` : ""}`;
|
|
5473
5541
|
}
|
|
5474
5542
|
}
|
|
5475
5543
|
return /* @__PURE__ */ _("div", {
|
|
@@ -5484,7 +5552,7 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5484
5552
|
children: [
|
|
5485
5553
|
se && /* @__PURE__ */ v("div", {
|
|
5486
5554
|
className: "flex",
|
|
5487
|
-
children: [/* @__PURE__ */ _("div", { className: "ui-cal-corner" }), e.map((e) => /* @__PURE__ */ _(
|
|
5555
|
+
children: [/* @__PURE__ */ _("div", { className: "ui-cal-corner" }), e.map((e) => /* @__PURE__ */ _(Ci, {
|
|
5488
5556
|
day: e,
|
|
5489
5557
|
weekday: W.format(e),
|
|
5490
5558
|
isToday: d(e, i.now),
|
|
@@ -5495,7 +5563,7 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5495
5563
|
}),
|
|
5496
5564
|
ce && /* @__PURE__ */ v("div", {
|
|
5497
5565
|
className: "flex",
|
|
5498
|
-
children: [/* @__PURE__ */ _("div", { className: "ui-cal-corner" }), O.map((e, t) => /* @__PURE__ */ _(
|
|
5566
|
+
children: [/* @__PURE__ */ _("div", { className: "ui-cal-corner" }), O.map((e, t) => /* @__PURE__ */ _(wi, {
|
|
5499
5567
|
resource: i.resourceById.get(e.resourceId ?? ""),
|
|
5500
5568
|
sub: t % x.length !== 0
|
|
5501
5569
|
}, e.key))]
|
|
@@ -5504,7 +5572,7 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5504
5572
|
className: "border-border flex border-t",
|
|
5505
5573
|
children: [/* @__PURE__ */ v("div", {
|
|
5506
5574
|
className: "ui-cal-corner text-text-tertiary flex flex-col items-end justify-center gap-0.5 pr-2 text-2xs",
|
|
5507
|
-
children: [/* @__PURE__ */ _("span", { children: i.labels.allDay }), L.count >
|
|
5575
|
+
children: [/* @__PURE__ */ _("span", { children: i.labels.allDay }), L.count > _i && /* @__PURE__ */ _("button", {
|
|
5508
5576
|
type: "button",
|
|
5509
5577
|
className: "text-accent cursor-pointer hover:underline",
|
|
5510
5578
|
"aria-expanded": E,
|
|
@@ -5513,19 +5581,19 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5513
5581
|
})]
|
|
5514
5582
|
}), /* @__PURE__ */ _("div", {
|
|
5515
5583
|
className: "relative flex-1",
|
|
5516
|
-
style: { height: R *
|
|
5584
|
+
style: { height: R * gi + 4 },
|
|
5517
5585
|
children: L.runs.map((e) => {
|
|
5518
5586
|
let t = L.lanes.get(e.id) ?? 0;
|
|
5519
5587
|
if (t >= R) return null;
|
|
5520
5588
|
let n = O[e.start], r = O[e.end - 1];
|
|
5521
|
-
return /* @__PURE__ */ _(
|
|
5589
|
+
return /* @__PURE__ */ _(oi, {
|
|
5522
5590
|
event: e.event,
|
|
5523
5591
|
compact: !0,
|
|
5524
5592
|
continuesBefore: !!n && a(e.event.start, e.event.end, n.day)?.continuesBefore,
|
|
5525
5593
|
continuesAfter: !!r && a(e.event.start, e.event.end, r.day)?.continuesAfter,
|
|
5526
5594
|
style: {
|
|
5527
|
-
top: t *
|
|
5528
|
-
height:
|
|
5595
|
+
top: t * gi + 2,
|
|
5596
|
+
height: gi - 3,
|
|
5529
5597
|
left: `calc(${e.start / O.length * 100}% + 2px)`,
|
|
5530
5598
|
width: `calc(${(e.end - e.start) / O.length * 100}% - 4px)`,
|
|
5531
5599
|
justifyContent: "center"
|
|
@@ -5548,7 +5616,7 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5548
5616
|
children: !i.timeZone && de.map((e) => /* @__PURE__ */ _("span", {
|
|
5549
5617
|
className: "text-text-tertiary font-mono absolute right-2 -translate-y-1/2 text-2xs",
|
|
5550
5618
|
style: { top: (e - b.min) * C },
|
|
5551
|
-
children:
|
|
5619
|
+
children: Ar(e, i)
|
|
5552
5620
|
}, e))
|
|
5553
5621
|
}), /* @__PURE__ */ v("div", {
|
|
5554
5622
|
role: "group",
|
|
@@ -5589,7 +5657,7 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5589
5657
|
className: "ui-cal-zone-label",
|
|
5590
5658
|
style: { top: (t - r.min) * C },
|
|
5591
5659
|
"aria-hidden": "true",
|
|
5592
|
-
children:
|
|
5660
|
+
children: Or(i.dates.dateAtMinutes(e.day, t), i)
|
|
5593
5661
|
}, `label-${t}`)),
|
|
5594
5662
|
n.outside.map(([e, t]) => /* @__PURE__ */ _("div", {
|
|
5595
5663
|
className: "ui-cal-outside",
|
|
@@ -5603,7 +5671,7 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5603
5671
|
}, `o${e}`)),
|
|
5604
5672
|
n.blocks.map((e) => {
|
|
5605
5673
|
let a = n.blockLayout?.get(e.item.id);
|
|
5606
|
-
return /* @__PURE__ */ _(
|
|
5674
|
+
return /* @__PURE__ */ _(ci, {
|
|
5607
5675
|
block: e.item,
|
|
5608
5676
|
resizeEdge: "bottom",
|
|
5609
5677
|
continuesAfter: e.continuesAfter,
|
|
@@ -5624,10 +5692,10 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5624
5692
|
style: V ? { left: V } : void 0,
|
|
5625
5693
|
className: G("absolute inset-0", F && "ui-cal-muted-layer"),
|
|
5626
5694
|
children: n.placed.map((e) => {
|
|
5627
|
-
let a = n.layout.get(e.item.id), o = Math.max((e.end - e.start) * C,
|
|
5628
|
-
return /* @__PURE__ */ _(
|
|
5695
|
+
let a = n.layout.get(e.item.id), o = Math.max((e.end - e.start) * C, vi);
|
|
5696
|
+
return /* @__PURE__ */ _(oi, {
|
|
5629
5697
|
event: e.item,
|
|
5630
|
-
compact: o <
|
|
5698
|
+
compact: o < yi,
|
|
5631
5699
|
resizeEdge: "bottom",
|
|
5632
5700
|
continuesBefore: e.continuesBefore,
|
|
5633
5701
|
continuesAfter: e.continuesAfter,
|
|
@@ -5663,14 +5731,14 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5663
5731
|
"data-dot": !c || void 0,
|
|
5664
5732
|
style: { top: (fe - r.min) * C }
|
|
5665
5733
|
}),
|
|
5666
|
-
me &&
|
|
5667
|
-
let t =
|
|
5668
|
-
return !t || typeof t != "object" ? null : /* @__PURE__ */ _(
|
|
5734
|
+
me && Br(he, e.resourceId, { emptyMatchesAll: !0 }) && (() => {
|
|
5735
|
+
let t = xi(me, e.day, r.min, r.max, a);
|
|
5736
|
+
return !t || typeof t != "object" ? null : /* @__PURE__ */ _(li, {
|
|
5669
5737
|
draft: me,
|
|
5670
5738
|
invalid: N?.invalid,
|
|
5671
5739
|
style: {
|
|
5672
5740
|
top: (t.start - r.min) * C + 1,
|
|
5673
|
-
height: Math.max((t.end - t.start) * C - 2,
|
|
5741
|
+
height: Math.max((t.end - t.start) * C - 2, vi),
|
|
5674
5742
|
left: V + 1,
|
|
5675
5743
|
right: 4
|
|
5676
5744
|
}
|
|
@@ -5695,8 +5763,8 @@ function gi({ days: e, events: t, availability: n, label: r }) {
|
|
|
5695
5763
|
})
|
|
5696
5764
|
});
|
|
5697
5765
|
}
|
|
5698
|
-
function
|
|
5699
|
-
let o =
|
|
5766
|
+
function Ci({ day: e, weekday: t, isToday: n, grow: r, bordered: i, onOpen: a }) {
|
|
5767
|
+
let o = Qr();
|
|
5700
5768
|
return /* @__PURE__ */ _("div", {
|
|
5701
5769
|
className: G("flex min-w-0 items-center justify-center py-1.5", i && "border-border border-l"),
|
|
5702
5770
|
style: { flex: `${r} 1 0` },
|
|
@@ -5716,8 +5784,8 @@ function _i({ day: e, weekday: t, isToday: n, grow: r, bordered: i, onOpen: a })
|
|
|
5716
5784
|
})
|
|
5717
5785
|
});
|
|
5718
5786
|
}
|
|
5719
|
-
function
|
|
5720
|
-
let n =
|
|
5787
|
+
function wi({ resource: e, sub: t }) {
|
|
5788
|
+
let n = Qr();
|
|
5721
5789
|
return /* @__PURE__ */ v("div", {
|
|
5722
5790
|
className: G("border-border flex min-w-0 flex-1 items-center gap-1.5 border-l px-2 py-1.5", t && "ui-cal-subhead"),
|
|
5723
5791
|
style: { minWidth: n.resourceMinWidth },
|
|
@@ -5739,8 +5807,8 @@ function vi({ resource: e, sub: t }) {
|
|
|
5739
5807
|
}
|
|
5740
5808
|
//#endregion
|
|
5741
5809
|
//#region src/components/ui/calendar/TimelineView.tsx
|
|
5742
|
-
var
|
|
5743
|
-
function
|
|
5810
|
+
var Ti = 34, Ei = 4, Di = 28;
|
|
5811
|
+
function Oi(e, t, n, r, i) {
|
|
5744
5812
|
let a = i(e.start, e.end, t);
|
|
5745
5813
|
return !a || a.endMinute <= n || a.startMinute >= r ? null : {
|
|
5746
5814
|
item: e,
|
|
@@ -5750,8 +5818,8 @@ function Si(e, t, n, r, i) {
|
|
|
5750
5818
|
continuesAfter: a.continuesAfter || a.endMinute > r
|
|
5751
5819
|
};
|
|
5752
5820
|
}
|
|
5753
|
-
function
|
|
5754
|
-
let i =
|
|
5821
|
+
function ki({ day: e, events: t, availability: n, label: r }) {
|
|
5822
|
+
let i = Qr(), { daySegment: a, isSameDay: o, minutesOfDay: s } = i.dates, c = i.dayBounds(e), d = m(null), f = i.resources.length === 0 && t.length === 0 && n.length === 0, [g, y] = h(0);
|
|
5755
5823
|
l(() => {
|
|
5756
5824
|
let e = d.current;
|
|
5757
5825
|
if (!e || typeof ResizeObserver > "u") return;
|
|
@@ -5782,7 +5850,7 @@ function Ci({ day: e, events: t, availability: n, label: r }) {
|
|
|
5782
5850
|
D,
|
|
5783
5851
|
T,
|
|
5784
5852
|
e
|
|
5785
|
-
]), j =
|
|
5853
|
+
]), j = hi({
|
|
5786
5854
|
axis: "x",
|
|
5787
5855
|
columns: k,
|
|
5788
5856
|
pxPerMinute: S,
|
|
@@ -5791,13 +5859,13 @@ function Ci({ day: e, events: t, availability: n, label: r }) {
|
|
|
5791
5859
|
blocks: p(() => new Map(n.map((e) => [e.id, e])), [n]),
|
|
5792
5860
|
initialColumn: 0
|
|
5793
5861
|
}), { drag: M, cursor: N } = j, P = i.editLayer === "availability", F = p(() => {
|
|
5794
|
-
let r =
|
|
5862
|
+
let r = Di / S;
|
|
5795
5863
|
return k.map((o) => {
|
|
5796
|
-
let s = t.filter((e) =>
|
|
5864
|
+
let s = t.filter((e) => Br(e.resourceId, o.resourceId, { emptyMatchesAll: !1 })).map((t) => Oi(t, e, c.min, c.max, a)).filter((e) => e !== null), l = Rr(s.map((e) => ({
|
|
5797
5865
|
id: e.item.id,
|
|
5798
5866
|
start: e.start,
|
|
5799
5867
|
end: Math.max(e.end, e.start + r)
|
|
5800
|
-
}))), u = n.filter((e) =>
|
|
5868
|
+
}))), u = n.filter((e) => Br(e.resourceId, o.resourceId, { emptyMatchesAll: !0 })).map((t) => Oi(t, e, c.min, c.max, a)).filter((e) => e !== null), d = P ? Rr(u.map((e) => ({
|
|
5801
5869
|
id: e.item.id,
|
|
5802
5870
|
start: e.start,
|
|
5803
5871
|
end: Math.max(e.end, e.start + r)
|
|
@@ -5807,7 +5875,7 @@ function Ci({ day: e, events: t, availability: n, label: r }) {
|
|
|
5807
5875
|
lanes: l,
|
|
5808
5876
|
blocks: u,
|
|
5809
5877
|
blockLanes: d,
|
|
5810
|
-
outside: i.hasAvailability && i.shadeOutsideAvailability ?
|
|
5878
|
+
outside: i.hasAvailability && i.shadeOutsideAvailability ? Ir(c.min, c.max, u.map((e) => [e.start, e.end])) : [],
|
|
5811
5879
|
laneCount: f
|
|
5812
5880
|
};
|
|
5813
5881
|
});
|
|
@@ -5844,7 +5912,7 @@ function Ci({ day: e, events: t, availability: n, label: r }) {
|
|
|
5844
5912
|
}, B = "";
|
|
5845
5913
|
if (N) {
|
|
5846
5914
|
let t = k[N.column], n = t?.resourceId ? i.resourceById.get(t.resourceId) : void 0;
|
|
5847
|
-
B = `${n ? `${n.title}, ` : ""}${i.timeZone ?
|
|
5915
|
+
B = `${n ? `${n.title}, ` : ""}${i.timeZone ? Or(i.dates.dateAtMinutes(e, N.start), i) : gr(N.start)} to ${i.timeZone ? Or(i.dates.dateAtMinutes(e, N.end), i) : gr(N.end)}`;
|
|
5848
5916
|
}
|
|
5849
5917
|
function oe(e) {
|
|
5850
5918
|
E((t) => {
|
|
@@ -5872,7 +5940,7 @@ function Ci({ day: e, events: t, availability: n, label: r }) {
|
|
|
5872
5940
|
children: ee.map((t) => /* @__PURE__ */ _("span", {
|
|
5873
5941
|
className: "text-text-tertiary font-mono absolute top-1.5 text-2xs",
|
|
5874
5942
|
style: { left: (t - c.min) * S + 4 },
|
|
5875
|
-
children: i.timeZone ?
|
|
5943
|
+
children: i.timeZone ? Or(i.dates.dateAtMinutes(e, t), i) : Ar(t, i)
|
|
5876
5944
|
}, t))
|
|
5877
5945
|
})]
|
|
5878
5946
|
}), /* @__PURE__ */ v("div", {
|
|
@@ -5918,7 +5986,7 @@ function Ci({ day: e, events: t, availability: n, label: r }) {
|
|
|
5918
5986
|
}), !n && t.resources.map((t) => {
|
|
5919
5987
|
let n = se++, r = F[n], o = k[n];
|
|
5920
5988
|
if (!r || !o) return null;
|
|
5921
|
-
let s = r.laneCount *
|
|
5989
|
+
let s = r.laneCount * Ti + Ei * 2;
|
|
5922
5990
|
return /* @__PURE__ */ v("div", {
|
|
5923
5991
|
className: "border-border flex border-b",
|
|
5924
5992
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -5958,7 +6026,7 @@ function Ci({ day: e, events: t, availability: n, label: r }) {
|
|
|
5958
6026
|
}, `o${e}`)),
|
|
5959
6027
|
r.blocks.map((e) => {
|
|
5960
6028
|
let t = r.blockLanes?.lanes.get(e.item.id);
|
|
5961
|
-
return /* @__PURE__ */ _(
|
|
6029
|
+
return /* @__PURE__ */ _(ci, {
|
|
5962
6030
|
block: e.item,
|
|
5963
6031
|
resizeEdge: "right",
|
|
5964
6032
|
continuesAfter: e.continuesAfter,
|
|
@@ -5966,8 +6034,8 @@ function Ci({ day: e, events: t, availability: n, label: r }) {
|
|
|
5966
6034
|
style: {
|
|
5967
6035
|
left: (e.start - c.min) * S,
|
|
5968
6036
|
width: Math.max((e.end - e.start) * S, 4),
|
|
5969
|
-
top: t === void 0 ? 0 :
|
|
5970
|
-
height: t === void 0 ? "100%" :
|
|
6037
|
+
top: t === void 0 ? 0 : Ei + t * Ti,
|
|
6038
|
+
height: t === void 0 ? "100%" : Ti - 3
|
|
5971
6039
|
},
|
|
5972
6040
|
onKeyDown: (t) => j.onItemKeyDown(t, "availability", e.item.id, n),
|
|
5973
6041
|
onClick: (t) => {
|
|
@@ -5979,7 +6047,7 @@ function Ci({ day: e, events: t, availability: n, label: r }) {
|
|
|
5979
6047
|
className: G("absolute inset-0", P && "ui-cal-muted-layer"),
|
|
5980
6048
|
children: r.placed.map((e) => {
|
|
5981
6049
|
let t = r.lanes.lanes.get(e.item.id) ?? 0;
|
|
5982
|
-
return /* @__PURE__ */ _(
|
|
6050
|
+
return /* @__PURE__ */ _(oi, {
|
|
5983
6051
|
event: e.item,
|
|
5984
6052
|
compact: !1,
|
|
5985
6053
|
dense: !0,
|
|
@@ -5989,9 +6057,9 @@ function Ci({ day: e, events: t, availability: n, label: r }) {
|
|
|
5989
6057
|
dragging: M?.itemId === e.item.id,
|
|
5990
6058
|
style: {
|
|
5991
6059
|
left: (e.start - c.min) * S + 1,
|
|
5992
|
-
width: Math.max((e.end - e.start) * S,
|
|
5993
|
-
top:
|
|
5994
|
-
height:
|
|
6060
|
+
width: Math.max((e.end - e.start) * S, Di) - 2,
|
|
6061
|
+
top: Ei + t * Ti,
|
|
6062
|
+
height: Ti - 3,
|
|
5995
6063
|
justifyContent: "center"
|
|
5996
6064
|
},
|
|
5997
6065
|
onKeyDown: (t) => j.onItemKeyDown(t, "event", e.item.id, n),
|
|
@@ -6006,16 +6074,16 @@ function Ci({ day: e, events: t, availability: n, label: r }) {
|
|
|
6006
6074
|
"data-axis": "x",
|
|
6007
6075
|
style: { left: (ne - c.min) * S }
|
|
6008
6076
|
}),
|
|
6009
|
-
z &&
|
|
6010
|
-
let t =
|
|
6011
|
-
return t ? /* @__PURE__ */ _(
|
|
6077
|
+
z && Br(ie, o.resourceId, { emptyMatchesAll: !0 }) && (() => {
|
|
6078
|
+
let t = Oi(z, e, c.min, c.max, a);
|
|
6079
|
+
return t ? /* @__PURE__ */ _(li, {
|
|
6012
6080
|
draft: z,
|
|
6013
6081
|
invalid: M?.invalid,
|
|
6014
6082
|
style: {
|
|
6015
6083
|
left: (t.start - c.min) * S + 1,
|
|
6016
|
-
width: Math.max((t.end - t.start) * S - 2,
|
|
6017
|
-
top:
|
|
6018
|
-
bottom:
|
|
6084
|
+
width: Math.max((t.end - t.start) * S - 2, Di),
|
|
6085
|
+
top: Ei,
|
|
6086
|
+
bottom: Ei
|
|
6019
6087
|
}
|
|
6020
6088
|
}) : null;
|
|
6021
6089
|
})(),
|
|
@@ -6041,7 +6109,7 @@ function Ci({ day: e, events: t, availability: n, label: r }) {
|
|
|
6041
6109
|
}
|
|
6042
6110
|
//#endregion
|
|
6043
6111
|
//#region src/components/ui/calendar/types.ts
|
|
6044
|
-
var
|
|
6112
|
+
var Ai = {
|
|
6045
6113
|
today: "Today",
|
|
6046
6114
|
previous: "Previous",
|
|
6047
6115
|
next: "Next",
|
|
@@ -6078,7 +6146,7 @@ var wi = {
|
|
|
6078
6146
|
};
|
|
6079
6147
|
//#endregion
|
|
6080
6148
|
//#region src/components/ui/RadioPill.tsx
|
|
6081
|
-
function
|
|
6149
|
+
function ji({ options: e, value: t, onChange: n, disabled: r, className: i, "aria-label": a }) {
|
|
6082
6150
|
return /* @__PURE__ */ _("div", {
|
|
6083
6151
|
role: "radiogroup",
|
|
6084
6152
|
"aria-label": a,
|
|
@@ -6095,25 +6163,25 @@ function Ti({ options: e, value: t, onChange: n, disabled: r, className: i, "ari
|
|
|
6095
6163
|
}
|
|
6096
6164
|
//#endregion
|
|
6097
6165
|
//#region src/components/ui/Calendar.tsx
|
|
6098
|
-
var
|
|
6166
|
+
var Mi = [
|
|
6099
6167
|
"day",
|
|
6100
6168
|
"threeDay",
|
|
6101
6169
|
"week",
|
|
6102
6170
|
"month",
|
|
6103
6171
|
"agenda"
|
|
6104
6172
|
];
|
|
6105
|
-
function
|
|
6173
|
+
function Ni() {
|
|
6106
6174
|
return /* @__PURE__ */ new Date();
|
|
6107
6175
|
}
|
|
6108
|
-
function
|
|
6109
|
-
let [t, n] = h(
|
|
6176
|
+
function Pi(e) {
|
|
6177
|
+
let [t, n] = h(Ni);
|
|
6110
6178
|
return l(() => {
|
|
6111
6179
|
if (e) return;
|
|
6112
|
-
let t = setInterval(() => n(
|
|
6180
|
+
let t = setInterval(() => n(Ni()), 3e4);
|
|
6113
6181
|
return () => clearInterval(t);
|
|
6114
6182
|
}, [e]), e ?? t;
|
|
6115
6183
|
}
|
|
6116
|
-
function
|
|
6184
|
+
function Fi(e) {
|
|
6117
6185
|
let [t, n] = h(null);
|
|
6118
6186
|
return l(() => {
|
|
6119
6187
|
let t = e.current;
|
|
@@ -6124,35 +6192,35 @@ function ki(e) {
|
|
|
6124
6192
|
return r.observe(t), () => r.disconnect();
|
|
6125
6193
|
}, [e]), t;
|
|
6126
6194
|
}
|
|
6127
|
-
var
|
|
6128
|
-
function
|
|
6195
|
+
var Ii = /* @__PURE__ */ new Set();
|
|
6196
|
+
function Li(e) {
|
|
6129
6197
|
let t = !1;
|
|
6130
6198
|
try {
|
|
6131
6199
|
t = process.env.NODE_ENV !== "production";
|
|
6132
6200
|
} catch {}
|
|
6133
|
-
!t ||
|
|
6201
|
+
!t || Ii.has(e) || (Ii.add(e), console.warn(`[Calendar] ${e}`));
|
|
6134
6202
|
}
|
|
6135
|
-
function
|
|
6203
|
+
function Ri(e, t, n) {
|
|
6136
6204
|
try {
|
|
6137
|
-
return
|
|
6205
|
+
return hr(t);
|
|
6138
6206
|
} catch {
|
|
6139
|
-
return
|
|
6207
|
+
return Li(`Invalid ${e} "${t}", expected HH:mm; using the default.`), n;
|
|
6140
6208
|
}
|
|
6141
6209
|
}
|
|
6142
|
-
function
|
|
6143
|
-
let ye = p(() =>
|
|
6210
|
+
function zi({ events: e = [], availability: t, resources: n = [], view: r, defaultView: i = "week", onViewChange: a, views: o = Mi, date: s, defaultDate: c, onDateChange: d, onRangeChange: g, weekStartsOn: y = 1, workWeekDays: b, agendaDays: x = 7, slotMinTime: S = "07:00", slotMaxTime: C = "20:00", slotDuration: w = 15, slotLabelInterval: T = 60, hourHeight: E = 48, timelineHourWidth: D = 96, resourceMinWidth: O = 120, scrollToTime: j, scrollAlign: M = "start", now: N, nowIndicator: P = !0, editLayer: F = "events", readOnly: I = !1, selectable: R, clickCreateDuration: ee = 30, shadeOutsideAvailability: te = !0, onCreate: ne, onEventClick: re, onEventChange: z, onAvailabilityClick: ie, onAvailabilityChange: ae, validate: B, onInvalidChange: oe, onDateClick: se, renderEvent: ce, monthMaxEvents: V, agendaShowAvailability: le = !0, display: ue, narrowView: H = "day", narrowWidth: de = 640, locale: U = "en-GB", timeZone: W, hour12: fe = !1, labels: pe, toolbar: me = !0, toolbarActions: he, loading: ge = !1, className: _e, "aria-label": ve }) {
|
|
6211
|
+
let ye = p(() => Xr(W), [W]), { addDays: be, formatLongDate: xe, formatRangeTitle: Se, getVisibleDays: Ce, minutesOfDay: we, shiftDate: Te } = ye, Ee = m(null), De = u(), Oe = Pi(N), ke = Fi(Ee), [Ae, je] = h(i), [Me, Ne] = h(() => c ?? Ni()), Pe = r ?? Ae, Fe = s ?? Me, K = (e) => {
|
|
6144
6212
|
r === void 0 && je(e), a?.(e);
|
|
6145
6213
|
}, Ie = (e) => {
|
|
6146
6214
|
s === void 0 && Ne(e), d?.(e);
|
|
6147
|
-
}, Le = ke !== null && ke < de && H !== !1 &&
|
|
6148
|
-
...
|
|
6215
|
+
}, Le = ke !== null && ke < de && H !== !1 && xr(Pe) && Pe !== "day" && H ? H : Pe, q = p(() => ({
|
|
6216
|
+
...Ai,
|
|
6149
6217
|
...pe,
|
|
6150
6218
|
views: {
|
|
6151
|
-
...
|
|
6219
|
+
...Ai.views,
|
|
6152
6220
|
...pe?.views
|
|
6153
6221
|
},
|
|
6154
6222
|
status: {
|
|
6155
|
-
...
|
|
6223
|
+
...Ai.status,
|
|
6156
6224
|
...pe?.status
|
|
6157
6225
|
}
|
|
6158
6226
|
}), [pe]), Re = p(() => ({
|
|
@@ -6182,16 +6250,16 @@ function Ni({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6182
6250
|
Ue,
|
|
6183
6251
|
Le
|
|
6184
6252
|
]);
|
|
6185
|
-
let Ge = p(() => e.filter((e) =>
|
|
6253
|
+
let Ge = p(() => e.filter((e) => Nr(e.start.getTime(), Math.max(e.end.getTime(), e.start.getTime() + 1), He, Ue)), [
|
|
6186
6254
|
e,
|
|
6187
6255
|
He,
|
|
6188
6256
|
Ue
|
|
6189
|
-
]), Ke = p(() => (t ?? []).filter((e) =>
|
|
6257
|
+
]), Ke = p(() => (t ?? []).filter((e) => Nr(e.start.getTime(), e.end.getTime(), He, Ue)), [
|
|
6190
6258
|
t,
|
|
6191
6259
|
He,
|
|
6192
6260
|
Ue
|
|
6193
|
-
]), qe =
|
|
6194
|
-
Je <= qe &&
|
|
6261
|
+
]), qe = Ri("slotMinTime", S, 0), Je = Ri("slotMaxTime", C, 1440);
|
|
6262
|
+
Je <= qe && Li(`slotMaxTime "${C}" must be after slotMinTime "${S}"; showing the whole day.`);
|
|
6195
6263
|
let Ye = p(() => Je > qe ? {
|
|
6196
6264
|
min: qe,
|
|
6197
6265
|
max: Je
|
|
@@ -6199,7 +6267,7 @@ function Ni({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6199
6267
|
min: 0,
|
|
6200
6268
|
max: 1440
|
|
6201
6269
|
}, [qe, Je]), Xe = Math.max(1, Math.round(w)), Y;
|
|
6202
|
-
if (j) Y =
|
|
6270
|
+
if (j) Y = Ri("scrollToTime", j, Ye.min);
|
|
6203
6271
|
else {
|
|
6204
6272
|
let e = Ke.filter((e) => (e.kind ?? "available") === "available").map((e) => W ? ye.parts(e.start).hour * 60 + ye.parts(e.start).minute : we(e.start)).filter((e) => e >= Ye.min && e < Ye.max);
|
|
6205
6273
|
e.length && (Y = Math.min(...e));
|
|
@@ -6211,8 +6279,8 @@ function Ni({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6211
6279
|
locale: U,
|
|
6212
6280
|
hour12: fe,
|
|
6213
6281
|
timeZone: W
|
|
6214
|
-
}, et = (e) => Ze.get(
|
|
6215
|
-
let t =
|
|
6282
|
+
}, et = (e) => Ze.get(zr(e)[0] ?? ""), tt = (e) => {
|
|
6283
|
+
let t = zr(e).map((e) => Ze.get(e)?.title).filter(Boolean);
|
|
6216
6284
|
return t.length ? `, ${t.join(", ")}` : "";
|
|
6217
6285
|
}, nt = (e) => e.status && e.status !== "confirmed" ? q.status[e.status] : void 0, rt = (e) => {
|
|
6218
6286
|
let t = B?.(e);
|
|
@@ -6260,7 +6328,7 @@ function Ni({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6260
6328
|
blockColor: (e) => e.color ?? et(e.resourceId)?.color ?? ((e.kind ?? "available") === "available" ? "green" : "gray"),
|
|
6261
6329
|
statusLabel: nt,
|
|
6262
6330
|
describeEvent: (e) => {
|
|
6263
|
-
let t = e.allDay ? `${xe(e.start, U)}, ${q.allDay}` : `${xe(e.start, U)}, ${
|
|
6331
|
+
let t = e.allDay ? `${xe(e.start, U)}, ${q.allDay}` : `${xe(e.start, U)}, ${kr(e.start, e.end, $e)}`, n = nt(e);
|
|
6264
6332
|
return [
|
|
6265
6333
|
e.title,
|
|
6266
6334
|
t,
|
|
@@ -6272,7 +6340,7 @@ function Ni({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6272
6340
|
describeBlock: (e) => [
|
|
6273
6341
|
(e.kind ?? "available") === "available" ? q.available : q.unavailable,
|
|
6274
6342
|
e.label,
|
|
6275
|
-
`${xe(e.start, U)}, ${
|
|
6343
|
+
`${xe(e.start, U)}, ${kr(e.start, e.end, $e)}`
|
|
6276
6344
|
].filter(Boolean).join(", ").concat(tt(e.resourceId)),
|
|
6277
6345
|
renderEvent: ce,
|
|
6278
6346
|
hasEventClick: !!re,
|
|
@@ -6317,27 +6385,27 @@ function Ni({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6317
6385
|
Xe,
|
|
6318
6386
|
n.map((e) => e.id)
|
|
6319
6387
|
]), st;
|
|
6320
|
-
return st = Le === "month" ? /* @__PURE__ */ _(
|
|
6388
|
+
return st = Le === "month" ? /* @__PURE__ */ _(ai, {
|
|
6321
6389
|
date: Fe,
|
|
6322
6390
|
events: Ge,
|
|
6323
6391
|
availability: Ke,
|
|
6324
6392
|
label: at
|
|
6325
|
-
}, W) : Le === "agenda" ? /* @__PURE__ */ _(
|
|
6393
|
+
}, W) : Le === "agenda" ? /* @__PURE__ */ _($r, {
|
|
6326
6394
|
days: J,
|
|
6327
6395
|
events: Ge.filter((e) => !e.placeholder),
|
|
6328
6396
|
availability: Ke.filter((e) => !e.placeholder),
|
|
6329
6397
|
label: at
|
|
6330
|
-
}, W) : Le === "timeline" ? /* @__PURE__ */ _(
|
|
6398
|
+
}, W) : Le === "timeline" ? /* @__PURE__ */ _(ki, {
|
|
6331
6399
|
day: J[0],
|
|
6332
6400
|
events: Ge,
|
|
6333
6401
|
availability: Ke,
|
|
6334
6402
|
label: at
|
|
6335
|
-
}, ot) : /* @__PURE__ */ _(
|
|
6403
|
+
}, ot) : /* @__PURE__ */ _(Si, {
|
|
6336
6404
|
days: J,
|
|
6337
6405
|
events: Ge,
|
|
6338
6406
|
availability: Ke,
|
|
6339
6407
|
label: at
|
|
6340
|
-
}, ot), /* @__PURE__ */ _(
|
|
6408
|
+
}, ot), /* @__PURE__ */ _(Zr.Provider, {
|
|
6341
6409
|
value: it,
|
|
6342
6410
|
children: /* @__PURE__ */ v("div", {
|
|
6343
6411
|
ref: Ee,
|
|
@@ -6386,12 +6454,12 @@ function Ni({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6386
6454
|
]
|
|
6387
6455
|
}), /* @__PURE__ */ v("div", {
|
|
6388
6456
|
className: "flex items-center gap-1.5",
|
|
6389
|
-
children: [he, o.length > 1 && (ke === null || ke >= o.length * 80 + 420 ? /* @__PURE__ */ _(
|
|
6457
|
+
children: [he, o.length > 1 && (ke === null || ke >= o.length * 80 + 420 ? /* @__PURE__ */ _(ji, {
|
|
6390
6458
|
"aria-label": q.view,
|
|
6391
6459
|
options: X,
|
|
6392
6460
|
value: Pe,
|
|
6393
6461
|
onChange: K
|
|
6394
|
-
}) : /* @__PURE__ */ _(
|
|
6462
|
+
}) : /* @__PURE__ */ _(xn, {
|
|
6395
6463
|
className: "w-28",
|
|
6396
6464
|
size: "sm",
|
|
6397
6465
|
options: X,
|
|
@@ -6415,7 +6483,7 @@ function Ni({ events: e = [], availability: t, resources: n = [], view: r, defau
|
|
|
6415
6483
|
}
|
|
6416
6484
|
//#endregion
|
|
6417
6485
|
//#region src/components/ui/CalendarGrid.tsx
|
|
6418
|
-
var
|
|
6486
|
+
var Bi = [
|
|
6419
6487
|
"Mo",
|
|
6420
6488
|
"Tu",
|
|
6421
6489
|
"We",
|
|
@@ -6423,7 +6491,7 @@ var Pi = [
|
|
|
6423
6491
|
"Fr",
|
|
6424
6492
|
"Sa",
|
|
6425
6493
|
"Su"
|
|
6426
|
-
],
|
|
6494
|
+
], Vi = [
|
|
6427
6495
|
"January",
|
|
6428
6496
|
"February",
|
|
6429
6497
|
"March",
|
|
@@ -6437,24 +6505,24 @@ var Pi = [
|
|
|
6437
6505
|
"November",
|
|
6438
6506
|
"December"
|
|
6439
6507
|
];
|
|
6440
|
-
function
|
|
6508
|
+
function Hi(e, t, n) {
|
|
6441
6509
|
let r = Z(e, n), i = Z(t, n);
|
|
6442
6510
|
return r.year === i.year && r.month === i.month && r.day === i.day;
|
|
6443
6511
|
}
|
|
6444
|
-
function
|
|
6512
|
+
function Ui(e, t, n) {
|
|
6445
6513
|
if (!t || !n) return !1;
|
|
6446
6514
|
let r = e.getTime(), i = Math.min(t.getTime(), n.getTime()), a = Math.max(t.getTime(), n.getTime());
|
|
6447
6515
|
return r > i && r < a;
|
|
6448
6516
|
}
|
|
6449
|
-
function
|
|
6517
|
+
function Wi(e, t) {
|
|
6450
6518
|
return new Date(e, t + 1, 0).getDate();
|
|
6451
6519
|
}
|
|
6452
|
-
function
|
|
6520
|
+
function Gi(e, t) {
|
|
6453
6521
|
let n = new Date(e, t, 1).getDay();
|
|
6454
6522
|
return n === 0 ? 6 : n - 1;
|
|
6455
6523
|
}
|
|
6456
|
-
function
|
|
6457
|
-
let f =
|
|
6524
|
+
function Ki({ year: e, month: t, timeZone: n, selected: r, rangeStart: i, rangeEnd: a, hoverDate: o, onSelect: s, onMonthChange: c, onHover: l, minDate: u, maxDate: d }) {
|
|
6525
|
+
let f = Wi(e, t), p = Gi(e, t), g = /* @__PURE__ */ new Date(), y = m(null), [b, x] = h(null);
|
|
6458
6526
|
function S() {
|
|
6459
6527
|
return b !== null && b >= 1 && b <= f ? b : r && Z(r, n).year === e && Z(r, n).month - 1 === t ? Z(r, n).day : i && Z(i, n).year === e && Z(i, n).month - 1 === t ? Z(i, n).day : Z(g, n).year === e && Z(g, n).month - 1 === t ? Z(g, n).day : 1;
|
|
6460
6528
|
}
|
|
@@ -6506,7 +6574,7 @@ function Bi({ year: e, month: t, timeZone: n, selected: r, rangeStart: i, rangeE
|
|
|
6506
6574
|
className: "text-text-primary text-xs font-semibold",
|
|
6507
6575
|
"aria-live": "polite",
|
|
6508
6576
|
children: [
|
|
6509
|
-
|
|
6577
|
+
Vi[t],
|
|
6510
6578
|
" ",
|
|
6511
6579
|
e
|
|
6512
6580
|
]
|
|
@@ -6521,12 +6589,12 @@ function Bi({ year: e, month: t, timeZone: n, selected: r, rangeStart: i, rangeE
|
|
|
6521
6589
|
]
|
|
6522
6590
|
}), /* @__PURE__ */ v("div", {
|
|
6523
6591
|
className: "grid grid-cols-7 gap-0",
|
|
6524
|
-
children: [
|
|
6592
|
+
children: [Bi.map((e) => /* @__PURE__ */ _("div", {
|
|
6525
6593
|
className: "text-text-tertiary text-2xs flex h-8 items-center justify-center font-medium",
|
|
6526
6594
|
children: e
|
|
6527
6595
|
}, e)), D.map((c, f) => {
|
|
6528
6596
|
if (c === null) return /* @__PURE__ */ _("div", { className: "h-8" }, `empty-${f}`);
|
|
6529
|
-
let p =
|
|
6597
|
+
let p = tr({
|
|
6530
6598
|
year: e,
|
|
6531
6599
|
month: t + 1,
|
|
6532
6600
|
day: c,
|
|
@@ -6534,13 +6602,13 @@ function Bi({ year: e, month: t, timeZone: n, selected: r, rangeStart: i, rangeE
|
|
|
6534
6602
|
minute: 0,
|
|
6535
6603
|
second: 0,
|
|
6536
6604
|
millisecond: 0
|
|
6537
|
-
}, n), m =
|
|
6605
|
+
}, n), m = Hi(p, g, n), h = r ? Hi(p, r, n) : !1, v = i ? Hi(p, i, n) : !1, y = a ? Hi(p, a, n) : !1, b = Ui(p, i ?? null, a ?? o ?? null), x = u && p < u || d && p > d;
|
|
6538
6606
|
return /* @__PURE__ */ _("button", {
|
|
6539
6607
|
type: "button",
|
|
6540
6608
|
"data-day": c,
|
|
6541
6609
|
disabled: !!x,
|
|
6542
6610
|
tabIndex: c === C ? 0 : -1,
|
|
6543
|
-
"aria-label": `${
|
|
6611
|
+
"aria-label": `${Vi[t]} ${c}, ${e}`,
|
|
6544
6612
|
"aria-current": m ? "date" : void 0,
|
|
6545
6613
|
onClick: () => s(p),
|
|
6546
6614
|
onKeyDown: (e) => w(e, c),
|
|
@@ -6555,21 +6623,24 @@ function Bi({ year: e, month: t, timeZone: n, selected: r, rangeStart: i, rangeE
|
|
|
6555
6623
|
}
|
|
6556
6624
|
//#endregion
|
|
6557
6625
|
//#region src/components/ui/Card.tsx
|
|
6558
|
-
function
|
|
6626
|
+
function qi({ children: e, className: t, header: n, footer: r, as: i = "div", flush: a = !1, bodyClassName: o, ...s }) {
|
|
6627
|
+
let c = an();
|
|
6559
6628
|
return /* @__PURE__ */ v(i, {
|
|
6560
6629
|
...s,
|
|
6561
6630
|
className: G("bg-bg-secondary border-border overflow-hidden rounded-md border", t),
|
|
6562
6631
|
children: [
|
|
6563
6632
|
n && /* @__PURE__ */ _("div", {
|
|
6564
|
-
|
|
6633
|
+
"data-control-size": c,
|
|
6634
|
+
className: "ui-bar border-border flex flex-col justify-center border-b px-3 py-2.5",
|
|
6565
6635
|
children: n
|
|
6566
6636
|
}),
|
|
6567
6637
|
/* @__PURE__ */ _("div", {
|
|
6568
|
-
className: G(!a && "p-3", o),
|
|
6638
|
+
className: G(!a && "ui-surface-body p-3", o),
|
|
6569
6639
|
children: e
|
|
6570
6640
|
}),
|
|
6571
6641
|
r && /* @__PURE__ */ _("div", {
|
|
6572
|
-
|
|
6642
|
+
"data-control-size": c,
|
|
6643
|
+
className: "ui-bar border-border bg-bg-primary/50 flex flex-col justify-center border-t px-3 py-2.5",
|
|
6573
6644
|
children: r
|
|
6574
6645
|
})
|
|
6575
6646
|
]
|
|
@@ -6577,16 +6648,16 @@ function Vi({ children: e, className: t, header: n, footer: r, as: i = "div", fl
|
|
|
6577
6648
|
}
|
|
6578
6649
|
//#endregion
|
|
6579
6650
|
//#region src/lib/codeInput.ts
|
|
6580
|
-
function
|
|
6651
|
+
function Ji(e, t) {
|
|
6581
6652
|
let n = e.replace(/\D/g, "").slice(0, t);
|
|
6582
6653
|
return Array.from({ length: t }, (e, t) => n[t] ?? "");
|
|
6583
6654
|
}
|
|
6584
|
-
function
|
|
6655
|
+
function Yi(e, t, n) {
|
|
6585
6656
|
if (!t || e.length <= t.length) return e;
|
|
6586
6657
|
let r = e.length - t.length, i = n ?? e.length;
|
|
6587
6658
|
return i - r >= 0 ? e.slice(i - r, i) : e.slice(-r);
|
|
6588
6659
|
}
|
|
6589
|
-
function
|
|
6660
|
+
function Xi(e, t, n) {
|
|
6590
6661
|
let r = e.length, i = n.match(RegExp(`(?<!\\d)\\d{${r}}(?!\\d)`));
|
|
6591
6662
|
if (i) return {
|
|
6592
6663
|
slots: i[0].split(""),
|
|
@@ -6606,7 +6677,7 @@ function Wi(e, t, n) {
|
|
|
6606
6677
|
focus: Math.min(t + a.length, r - 1)
|
|
6607
6678
|
};
|
|
6608
6679
|
}
|
|
6609
|
-
function
|
|
6680
|
+
function Zi(e, t, n, r) {
|
|
6610
6681
|
if (n === "") {
|
|
6611
6682
|
let n = [...e];
|
|
6612
6683
|
return n[t] = "", {
|
|
@@ -6614,9 +6685,9 @@ function Gi(e, t, n, r) {
|
|
|
6614
6685
|
focus: t
|
|
6615
6686
|
};
|
|
6616
6687
|
}
|
|
6617
|
-
return
|
|
6688
|
+
return Xi(e, t, Yi(n, e[t], r));
|
|
6618
6689
|
}
|
|
6619
|
-
function
|
|
6690
|
+
function Qi(e, t) {
|
|
6620
6691
|
let n = e[t] ? t : t - 1;
|
|
6621
6692
|
if (n < 0) return null;
|
|
6622
6693
|
let r = [...e];
|
|
@@ -6627,15 +6698,15 @@ function Ki(e, t) {
|
|
|
6627
6698
|
}
|
|
6628
6699
|
//#endregion
|
|
6629
6700
|
//#region src/components/ui/CodeInput.tsx
|
|
6630
|
-
function
|
|
6631
|
-
let f = m([]), p = u(), g = a || !!i, [y, b] = h(() =>
|
|
6701
|
+
function $i({ value: e, onChange: t, onComplete: n, length: r = 6, error: i, invalid: a, disabled: o, autoFocus: s, name: c, "aria-label": l = "Verification code", className: d }) {
|
|
6702
|
+
let f = m([]), p = u(), g = a || !!i, [y, b] = h(() => Ji(e, r)), [x, S] = h({
|
|
6632
6703
|
value: e,
|
|
6633
6704
|
length: r
|
|
6634
6705
|
});
|
|
6635
6706
|
(x.value !== e || x.length !== r) && (S({
|
|
6636
6707
|
value: e,
|
|
6637
6708
|
length: r
|
|
6638
|
-
}), (y.length !== r || y.join("") !== e) && b(
|
|
6709
|
+
}), (y.length !== r || y.join("") !== e) && b(Ji(e, r)));
|
|
6639
6710
|
function C(e) {
|
|
6640
6711
|
let t = f.current[Math.max(0, Math.min(e, r - 1))];
|
|
6641
6712
|
t?.focus(), t?.select();
|
|
@@ -6647,7 +6718,7 @@ function qi({ value: e, onChange: t, onComplete: n, length: r = 6, error: i, inv
|
|
|
6647
6718
|
t(r), e.slots.every(Boolean) && n?.(r), C(e.focus);
|
|
6648
6719
|
}
|
|
6649
6720
|
function T(e, t) {
|
|
6650
|
-
t.key === "Backspace" ? (t.preventDefault(), w(
|
|
6721
|
+
t.key === "Backspace" ? (t.preventDefault(), w(Qi(y, e))) : t.key === "ArrowLeft" ? (t.preventDefault(), C(e - 1)) : t.key === "ArrowRight" && (t.preventDefault(), C(e + 1));
|
|
6651
6722
|
}
|
|
6652
6723
|
return /* @__PURE__ */ v("div", {
|
|
6653
6724
|
className: G("flex flex-col gap-1.5", d),
|
|
@@ -6670,10 +6741,10 @@ function qi({ value: e, onChange: t, onComplete: n, length: r = 6, error: i, inv
|
|
|
6670
6741
|
"aria-describedby": i ? p : void 0,
|
|
6671
6742
|
value: e,
|
|
6672
6743
|
onFocus: (e) => e.target.select(),
|
|
6673
|
-
onChange: (e) => w(
|
|
6744
|
+
onChange: (e) => w(Zi(y, t, e.target.value, e.target.selectionStart)),
|
|
6674
6745
|
onKeyDown: (e) => T(t, e),
|
|
6675
6746
|
onPaste: (e) => {
|
|
6676
|
-
e.preventDefault(), w(
|
|
6747
|
+
e.preventDefault(), w(Xi(y, t, e.clipboardData.getData("text")));
|
|
6677
6748
|
},
|
|
6678
6749
|
className: G("bg-bg-secondary text-text-primary h-10 w-10 rounded-md border text-center font-mono text-sm", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-40", g ? "border-red" : "border-border")
|
|
6679
6750
|
}, t))
|
|
@@ -6695,7 +6766,7 @@ function qi({ value: e, onChange: t, onComplete: n, length: r = 6, error: i, inv
|
|
|
6695
6766
|
}
|
|
6696
6767
|
//#endregion
|
|
6697
6768
|
//#region src/components/ui/Combobox.tsx
|
|
6698
|
-
function
|
|
6769
|
+
function ea({ options: e, value: t, onChange: n, onOptionChange: r, placeholder: i = "Select...", label: a, className: o, controlSize: c, id: l, name: d, disabled: f, "aria-label": p, "aria-describedby": g, "aria-invalid": y, query: b, onQueryChange: x, filterOptions: S = !0, selectedOption: C, renderOption: w, loading: T = !1, loadingMessage: D = "Loading results…", error: k, onRetry: A, emptyMessage: j = "No results", footer: M }) {
|
|
6699
6770
|
let N = an(c), [P, F] = h(!1), [I, L] = h(""), [R, ee] = h(0), [te, ne] = h(() => e.find((e) => e.value === t)), re = m(null), z = m(null), ie = m(null), ae = u(), oe = l ?? `${ae}-search`, se = `${ae}-label`, ce = `${ae}-selected`, V = `${ae}-listbox`, le = b ?? I, ue = e.find((e) => e.value === t) ?? (C?.value === t ? C : void 0) ?? (te?.value === t ? te : void 0), H = S ? e.filter((e) => e.label.toLowerCase().includes(le.toLowerCase())) : e, de = Math.min(R, Math.max(H.length - 1, 0)), U = H[de], W = P && !f;
|
|
6700
6771
|
function fe(e) {
|
|
6701
6772
|
b === void 0 && L(e), x?.(e), ee(0);
|
|
@@ -6729,7 +6800,7 @@ function Ji({ options: e, value: t, onChange: n, onOptionChange: r, placeholder:
|
|
|
6729
6800
|
children: [
|
|
6730
6801
|
a && /* @__PURE__ */ _("span", {
|
|
6731
6802
|
id: se,
|
|
6732
|
-
className: "
|
|
6803
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
6733
6804
|
children: a
|
|
6734
6805
|
}),
|
|
6735
6806
|
d && /* @__PURE__ */ _("input", {
|
|
@@ -6860,7 +6931,7 @@ function Ji({ options: e, value: t, onChange: n, onOptionChange: r, placeholder:
|
|
|
6860
6931
|
}
|
|
6861
6932
|
//#endregion
|
|
6862
6933
|
//#region src/components/ui/DangerZone.tsx
|
|
6863
|
-
function
|
|
6934
|
+
function ta({ title: e = "Danger Zone", description: t, children: n, className: r }) {
|
|
6864
6935
|
return /* @__PURE__ */ v("div", {
|
|
6865
6936
|
className: G("border-border mt-8 border-t pt-6", r),
|
|
6866
6937
|
children: [
|
|
@@ -6878,7 +6949,7 @@ function Yi({ title: e = "Danger Zone", description: t, children: n, className:
|
|
|
6878
6949
|
}
|
|
6879
6950
|
//#endregion
|
|
6880
6951
|
//#region src/components/ui/DatePicker.tsx
|
|
6881
|
-
function
|
|
6952
|
+
function na(e) {
|
|
6882
6953
|
return `${[
|
|
6883
6954
|
"Jan",
|
|
6884
6955
|
"Feb",
|
|
@@ -6894,8 +6965,8 @@ function Xi(e) {
|
|
|
6894
6965
|
"Dec"
|
|
6895
6966
|
][e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`;
|
|
6896
6967
|
}
|
|
6897
|
-
function
|
|
6898
|
-
let c = an(e), [l, u] = h(!1), d = m(null), f = m(null), p =
|
|
6968
|
+
function ra({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, placeholder: a = "Select date...", format: o }) {
|
|
6969
|
+
let c = an(e), [l, u] = h(!1), d = m(null), f = m(null), p = bn(l, d, f), g = Z(r ?? /* @__PURE__ */ new Date(), n), [y, b] = h(g.year), [x, S] = h(g.month - 1);
|
|
6899
6970
|
jt(l, s(() => u(!1), []), [d]);
|
|
6900
6971
|
function C(e) {
|
|
6901
6972
|
i(e), u(!1);
|
|
@@ -6907,7 +6978,7 @@ function Zi({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
6907
6978
|
className: "flex flex-col gap-1.5",
|
|
6908
6979
|
ref: d,
|
|
6909
6980
|
children: [t && /* @__PURE__ */ _("span", {
|
|
6910
|
-
className: "
|
|
6981
|
+
className: "ui-field-label text-xs font-medium",
|
|
6911
6982
|
children: t
|
|
6912
6983
|
}), /* @__PURE__ */ v("div", {
|
|
6913
6984
|
className: "relative",
|
|
@@ -6924,7 +6995,7 @@ function Zi({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
6924
6995
|
day: "numeric",
|
|
6925
6996
|
month: "short",
|
|
6926
6997
|
year: "numeric"
|
|
6927
|
-
}).format(r) :
|
|
6998
|
+
}).format(r) : na(r) : /* @__PURE__ */ _("span", {
|
|
6928
6999
|
className: "text-text-disabled",
|
|
6929
7000
|
children: a
|
|
6930
7001
|
})
|
|
@@ -6935,7 +7006,7 @@ function Zi({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
6935
7006
|
role: "dialog",
|
|
6936
7007
|
"aria-label": "Choose date",
|
|
6937
7008
|
className: G("bg-bg-tertiary border-border-strong animate-scale-in absolute left-0 z-[100] rounded-md border p-3 shadow-lg", p ? "bottom-full mb-1" : "top-full mt-1"),
|
|
6938
|
-
children: /* @__PURE__ */ _(
|
|
7009
|
+
children: /* @__PURE__ */ _(Ki, {
|
|
6939
7010
|
timeZone: n,
|
|
6940
7011
|
year: y,
|
|
6941
7012
|
month: x,
|
|
@@ -6952,7 +7023,7 @@ function Zi({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
6952
7023
|
}
|
|
6953
7024
|
//#endregion
|
|
6954
7025
|
//#region src/components/ui/DateRangePicker.tsx
|
|
6955
|
-
var
|
|
7026
|
+
var ia = [
|
|
6956
7027
|
"Jan",
|
|
6957
7028
|
"Feb",
|
|
6958
7029
|
"Mar",
|
|
@@ -6966,14 +7037,14 @@ var Qi = [
|
|
|
6966
7037
|
"Nov",
|
|
6967
7038
|
"Dec"
|
|
6968
7039
|
];
|
|
6969
|
-
function
|
|
6970
|
-
return `${
|
|
7040
|
+
function aa(e) {
|
|
7041
|
+
return `${ia[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`;
|
|
6971
7042
|
}
|
|
6972
|
-
function
|
|
6973
|
-
return e.start && e.end ? `${
|
|
7043
|
+
function oa(e) {
|
|
7044
|
+
return e.start && e.end ? `${aa(e.start)} – ${aa(e.end)}` : e.start ? aa(e.start) : "";
|
|
6974
7045
|
}
|
|
6975
|
-
function
|
|
6976
|
-
let a = an(e), [o, c] = h(!1), l = m(null), u = m(null), d =
|
|
7046
|
+
function sa({ controlSize: e, label: t, value: n, onChange: r, placeholder: i = "Select date range..." }) {
|
|
7047
|
+
let a = an(e), [o, c] = h(!1), l = m(null), u = m(null), d = bn(o, l, u), f = /* @__PURE__ */ new Date(), [p, g] = h(n.start?.getFullYear() ?? f.getFullYear()), [y, b] = h(n.start?.getMonth() ?? f.getMonth()), [x, S] = h(null), [C, w] = h("start"), [E, D] = h(n.start), [O, k] = h(n.end);
|
|
6977
7048
|
jt(o, s(() => c(!1), []), [l]);
|
|
6978
7049
|
let A = y === 11 ? p + 1 : p, j = y === 11 ? 0 : y + 1;
|
|
6979
7050
|
function M() {
|
|
@@ -6991,12 +7062,12 @@ function ta({ controlSize: e, label: t, value: n, onChange: r, placeholder: i =
|
|
|
6991
7062
|
function F() {
|
|
6992
7063
|
y === 11 ? (g(p + 1), b(0)) : b(y + 1);
|
|
6993
7064
|
}
|
|
6994
|
-
let I = n.start || n.end ?
|
|
7065
|
+
let I = n.start || n.end ? oa(n) : "";
|
|
6995
7066
|
return /* @__PURE__ */ v("div", {
|
|
6996
7067
|
className: "flex flex-col gap-1.5",
|
|
6997
7068
|
ref: l,
|
|
6998
7069
|
children: [t && /* @__PURE__ */ _("span", {
|
|
6999
|
-
className: "
|
|
7070
|
+
className: "ui-field-label text-xs font-medium",
|
|
7000
7071
|
children: t
|
|
7001
7072
|
}), /* @__PURE__ */ v("div", {
|
|
7002
7073
|
className: "relative",
|
|
@@ -7050,7 +7121,7 @@ function ta({ controlSize: e, label: t, value: n, onChange: r, placeholder: i =
|
|
|
7050
7121
|
]
|
|
7051
7122
|
}), /* @__PURE__ */ v("div", {
|
|
7052
7123
|
className: "flex gap-4",
|
|
7053
|
-
children: [/* @__PURE__ */ _(
|
|
7124
|
+
children: [/* @__PURE__ */ _(Ki, {
|
|
7054
7125
|
year: p,
|
|
7055
7126
|
month: y,
|
|
7056
7127
|
rangeStart: E,
|
|
@@ -7061,7 +7132,7 @@ function ta({ controlSize: e, label: t, value: n, onChange: r, placeholder: i =
|
|
|
7061
7132
|
g(e), b(t);
|
|
7062
7133
|
},
|
|
7063
7134
|
onHover: S
|
|
7064
|
-
}), /* @__PURE__ */ _(
|
|
7135
|
+
}), /* @__PURE__ */ _(Ki, {
|
|
7065
7136
|
year: A,
|
|
7066
7137
|
month: j,
|
|
7067
7138
|
rangeStart: E,
|
|
@@ -7081,7 +7152,7 @@ function ta({ controlSize: e, label: t, value: n, onChange: r, placeholder: i =
|
|
|
7081
7152
|
}
|
|
7082
7153
|
//#endregion
|
|
7083
7154
|
//#region src/components/ui/DateTimePicker.tsx
|
|
7084
|
-
var
|
|
7155
|
+
var ca = [
|
|
7085
7156
|
"Jan",
|
|
7086
7157
|
"Feb",
|
|
7087
7158
|
"Mar",
|
|
@@ -7095,7 +7166,7 @@ var na = [
|
|
|
7095
7166
|
"Nov",
|
|
7096
7167
|
"Dec"
|
|
7097
7168
|
];
|
|
7098
|
-
function
|
|
7169
|
+
function la(e) {
|
|
7099
7170
|
return e === 0 ? {
|
|
7100
7171
|
hour12: 12,
|
|
7101
7172
|
period: "AM"
|
|
@@ -7110,10 +7181,10 @@ function ra(e) {
|
|
|
7110
7181
|
period: "PM"
|
|
7111
7182
|
};
|
|
7112
7183
|
}
|
|
7113
|
-
function
|
|
7184
|
+
function ua(e, t) {
|
|
7114
7185
|
return t === "AM" ? e === 12 ? 0 : e : e === 12 ? 12 : e + 12;
|
|
7115
7186
|
}
|
|
7116
|
-
function
|
|
7187
|
+
function da(e, t) {
|
|
7117
7188
|
if (t) return new Intl.DateTimeFormat("en-GB", {
|
|
7118
7189
|
timeZone: t,
|
|
7119
7190
|
day: "numeric",
|
|
@@ -7124,20 +7195,20 @@ function aa(e, t) {
|
|
|
7124
7195
|
timeZoneName: "short",
|
|
7125
7196
|
hourCycle: "h23"
|
|
7126
7197
|
}).format(e);
|
|
7127
|
-
let n =
|
|
7198
|
+
let n = ca[e.getMonth()], r = e.getDate(), i = e.getFullYear(), { hour12: a, period: o } = la(e.getHours());
|
|
7128
7199
|
return `${n} ${r}, ${i} ${a}:${String(e.getMinutes()).padStart(2, "0")} ${o}`;
|
|
7129
7200
|
}
|
|
7130
|
-
function
|
|
7201
|
+
function fa(e) {
|
|
7131
7202
|
return String(e).padStart(2, "0");
|
|
7132
7203
|
}
|
|
7133
|
-
function
|
|
7134
|
-
return /* @__PURE__ */ _(
|
|
7204
|
+
function pa(e) {
|
|
7205
|
+
return /* @__PURE__ */ _(ma, { ...e }, e.timeZone ?? "browser-local");
|
|
7135
7206
|
}
|
|
7136
|
-
function
|
|
7137
|
-
let o = an(e), [c, l] = h(!1), [d, f] = h(null), [p, g] = h(!1), [y, b] = h("reject"), x = u(), S = m(null), C = m(null), w =
|
|
7207
|
+
function ma({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, placeholder: a = "Select date & time..." }) {
|
|
7208
|
+
let o = an(e), [c, l] = h(!1), [d, f] = h(null), [p, g] = h(!1), [y, b] = h("reject"), x = u(), S = m(null), C = m(null), w = bn(c, S, C), E = Z(r ?? /* @__PURE__ */ new Date(), n), D = r ? la(Z(r, n).hour) : {
|
|
7138
7209
|
hour12: 12,
|
|
7139
7210
|
period: "PM"
|
|
7140
|
-
}, [O, k] = h(E.year), [A, j] = h(E.month - 1), [M, N] = h(String(D.hour12)), [P, F] = h(r ?
|
|
7211
|
+
}, [O, k] = h(E.year), [A, j] = h(E.month - 1), [M, N] = h(String(D.hour12)), [P, F] = h(r ? fa(Z(r, n).minute) : "00"), [I, L] = h(D.period), [R, ee] = h(r);
|
|
7141
7212
|
jt(c, s(() => l(!1), []), [S]);
|
|
7142
7213
|
function te(e) {
|
|
7143
7214
|
ee(e);
|
|
@@ -7150,7 +7221,7 @@ function ca({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
7150
7221
|
}
|
|
7151
7222
|
function re() {
|
|
7152
7223
|
if (!R) return;
|
|
7153
|
-
let e = Math.max(1, Math.min(12, parseInt(M, 10) || 12)), t = Math.max(0, Math.min(59, parseInt(P, 10) || 0)), a =
|
|
7224
|
+
let e = Math.max(1, Math.min(12, parseInt(M, 10) || 12)), t = Math.max(0, Math.min(59, parseInt(P, 10) || 0)), a = ua(e, I), o = {
|
|
7154
7225
|
...Z(R, n),
|
|
7155
7226
|
hour: a,
|
|
7156
7227
|
minute: t,
|
|
@@ -7164,7 +7235,7 @@ function ca({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
7164
7235
|
"day",
|
|
7165
7236
|
"hour",
|
|
7166
7237
|
"minute"
|
|
7167
|
-
].every((e) => s[e] === o[e]) ? new Date(r) :
|
|
7238
|
+
].every((e) => s[e] === o[e]) ? new Date(r) : tr(o, n, y);
|
|
7168
7239
|
let e = Z(c, n);
|
|
7169
7240
|
if (e.hour !== a || e.minute !== t || e.day !== o.day) throw RangeError("This time does not exist in the selected timezone");
|
|
7170
7241
|
} catch (e) {
|
|
@@ -7177,13 +7248,13 @@ function ca({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
7177
7248
|
function z() {
|
|
7178
7249
|
if (!c && r) {
|
|
7179
7250
|
k(Z(r, n).year), j(Z(r, n).month - 1), ee(r);
|
|
7180
|
-
let e =
|
|
7181
|
-
N(String(e.hour12)), L(e.period), F(
|
|
7251
|
+
let e = la(Z(r, n).hour);
|
|
7252
|
+
N(String(e.hour12)), L(e.period), F(fa(Z(r, n).minute));
|
|
7182
7253
|
}
|
|
7183
7254
|
f(null);
|
|
7184
7255
|
let e = !1;
|
|
7185
7256
|
if (!c && r && n) try {
|
|
7186
|
-
|
|
7257
|
+
tr(Z(r, n), n, "reject");
|
|
7187
7258
|
} catch (t) {
|
|
7188
7259
|
e = t instanceof Error && t.message.includes("twice");
|
|
7189
7260
|
}
|
|
@@ -7193,7 +7264,7 @@ function ca({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
7193
7264
|
className: "flex flex-col gap-1.5",
|
|
7194
7265
|
ref: S,
|
|
7195
7266
|
children: [t && /* @__PURE__ */ _("span", {
|
|
7196
|
-
className: "
|
|
7267
|
+
className: "ui-field-label text-xs font-medium",
|
|
7197
7268
|
children: t
|
|
7198
7269
|
}), /* @__PURE__ */ v("div", {
|
|
7199
7270
|
className: "relative",
|
|
@@ -7205,7 +7276,7 @@ function ca({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
7205
7276
|
"aria-haspopup": "dialog",
|
|
7206
7277
|
"aria-expanded": c,
|
|
7207
7278
|
className: G("ui-sized-control flex h-7 w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "px-2 pr-7"),
|
|
7208
|
-
children: r ?
|
|
7279
|
+
children: r ? da(r, n) : /* @__PURE__ */ _("span", {
|
|
7209
7280
|
className: "text-text-disabled",
|
|
7210
7281
|
children: a
|
|
7211
7282
|
})
|
|
@@ -7217,7 +7288,7 @@ function ca({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
7217
7288
|
"aria-label": "Choose date and time",
|
|
7218
7289
|
className: G("bg-bg-tertiary border-border-strong animate-scale-in absolute left-0 z-[100] rounded-md border p-3 shadow-lg", w ? "bottom-full mb-1" : "top-full mt-1"),
|
|
7219
7290
|
children: [
|
|
7220
|
-
/* @__PURE__ */ _(
|
|
7291
|
+
/* @__PURE__ */ _(Ki, {
|
|
7221
7292
|
timeZone: n,
|
|
7222
7293
|
year: O,
|
|
7223
7294
|
month: A,
|
|
@@ -7330,8 +7401,8 @@ function ca({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
7330
7401
|
}
|
|
7331
7402
|
//#endregion
|
|
7332
7403
|
//#region src/components/ui/DetailPanel.tsx
|
|
7333
|
-
var
|
|
7334
|
-
function
|
|
7404
|
+
var ha = 360, ga = 260, _a = 700;
|
|
7405
|
+
function va({ open: e, onClose: t, title: n, children: r, className: i, resizable: a = !0, defaultWidth: o = ha, minWidth: c = ga, maxWidth: u = _a }) {
|
|
7335
7406
|
let [d, f] = h(o), p = m(!1), g = m(0), y = m(0);
|
|
7336
7407
|
l(() => {
|
|
7337
7408
|
if (!e) return;
|
|
@@ -7382,26 +7453,37 @@ function fa({ open: e, onClose: t, title: n, children: r, className: i, resizabl
|
|
|
7382
7453
|
})
|
|
7383
7454
|
});
|
|
7384
7455
|
}
|
|
7385
|
-
function
|
|
7456
|
+
function ya(e, t) {
|
|
7457
|
+
let n = /^\s*(\d*\.?\d+)(px|rem)\s*$/.exec(e);
|
|
7458
|
+
if (!n) return 8;
|
|
7459
|
+
let r = Number(n[1]), i = n[2] === "rem" ? r * t : r;
|
|
7460
|
+
return Number.isFinite(i) && i >= 0 ? i * 2 : 8;
|
|
7461
|
+
}
|
|
7462
|
+
function ba(e, t, [n, r], [i, a], [o, s], c) {
|
|
7386
7463
|
let [l, u] = r - n <= s - o - c * 2 ? [n, r] : [i, a], d = t + (o + c - l), f = t + (s - c - u);
|
|
7387
7464
|
return f < d && (f = d), d = Math.min(d, 0), f = Math.max(f, 0), Math.min(f, Math.max(d, e));
|
|
7388
7465
|
}
|
|
7389
|
-
function
|
|
7466
|
+
function xa(e, t, n, r, i, a) {
|
|
7390
7467
|
return {
|
|
7391
|
-
x:
|
|
7392
|
-
y:
|
|
7468
|
+
x: ba(e.x, t.x, [n.left, n.right], [r.left, r.right], [i.left, i.right], a),
|
|
7469
|
+
y: ba(e.y, t.y, [n.top, n.bottom], [r.top, r.bottom], [i.top, i.bottom], a)
|
|
7393
7470
|
};
|
|
7394
7471
|
}
|
|
7395
|
-
function
|
|
7472
|
+
function Sa({ x: e, y: t }) {
|
|
7396
7473
|
return e === 0 && t === 0 ? "" : `${e}px ${t}px`;
|
|
7397
7474
|
}
|
|
7398
7475
|
//#endregion
|
|
7399
7476
|
//#region src/components/ui/Dialog.tsx
|
|
7400
|
-
var
|
|
7477
|
+
var Ca = {
|
|
7478
|
+
sm: "max-w-[400px]",
|
|
7479
|
+
md: "max-w-[576px]",
|
|
7480
|
+
lg: "max-w-[768px]",
|
|
7481
|
+
xl: "max-w-[1024px]"
|
|
7482
|
+
}, wa = "(min-width: 48rem)", Ta = "a[href], button, input, select, textarea, label, summary, [contenteditable]:not([contenteditable=\"false\"]), [role=\"button\"], [role=\"link\"], [tabindex]:not([tabindex=\"-1\"])", Ea = {
|
|
7401
7483
|
x: 0,
|
|
7402
7484
|
y: 0
|
|
7403
7485
|
};
|
|
7404
|
-
function
|
|
7486
|
+
function Da(e) {
|
|
7405
7487
|
let t = e.getBoundingClientRect();
|
|
7406
7488
|
return {
|
|
7407
7489
|
left: t.left,
|
|
@@ -7410,75 +7492,172 @@ function ya(e) {
|
|
|
7410
7492
|
bottom: t.top + e.clientHeight
|
|
7411
7493
|
};
|
|
7412
7494
|
}
|
|
7413
|
-
|
|
7414
|
-
|
|
7495
|
+
var Oa = {
|
|
7496
|
+
top: "bottom",
|
|
7497
|
+
bottom: "top",
|
|
7498
|
+
left: "right",
|
|
7499
|
+
right: "left"
|
|
7500
|
+
};
|
|
7501
|
+
function ka(e, t) {
|
|
7502
|
+
return {
|
|
7503
|
+
x: e.x + t.x,
|
|
7504
|
+
y: e.y + t.y
|
|
7505
|
+
};
|
|
7415
7506
|
}
|
|
7416
|
-
function
|
|
7417
|
-
let
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7507
|
+
function Aa(e, t) {
|
|
7508
|
+
let n = t.getBoundingClientRect();
|
|
7509
|
+
return {
|
|
7510
|
+
left: n.left + e.offsetLeft - t.scrollLeft,
|
|
7511
|
+
top: n.top + e.offsetTop - t.scrollTop,
|
|
7512
|
+
width: e.offsetWidth,
|
|
7513
|
+
height: e.offsetHeight
|
|
7514
|
+
};
|
|
7515
|
+
}
|
|
7516
|
+
function ja(e, t) {
|
|
7517
|
+
if (!(e instanceof HTMLElement) || !e.isConnected) return null;
|
|
7518
|
+
let n = e.ownerDocument;
|
|
7519
|
+
return e === n.body || e === n.documentElement || t.contains(e) ? null : e.getClientRects().length > 0 ? e : null;
|
|
7520
|
+
}
|
|
7521
|
+
function Ma(e) {
|
|
7522
|
+
return e.ownerDocument.defaultView?.matchMedia(wa).matches ?? !1;
|
|
7523
|
+
}
|
|
7524
|
+
function Na(e) {
|
|
7525
|
+
let t = e.ownerDocument.defaultView;
|
|
7526
|
+
return t ? ya(t.getComputedStyle(e).getPropertyValue("--spacing"), parseFloat(t.getComputedStyle(e.ownerDocument.documentElement).fontSize)) : 8;
|
|
7527
|
+
}
|
|
7528
|
+
function Pa({ open: e, draggable: t, remember: n, placement: r, anchorRef: i }, a, o) {
|
|
7529
|
+
let s = m(Ea), c = m(Ea), l = m(8), u = m(null), d = m(null), p = m(!1), h = e && t;
|
|
7530
|
+
f(() => {
|
|
7531
|
+
let f = a.current, m = h ? o.current : null, g = f?.parentElement, _ = f?.ownerDocument.defaultView, v = r !== "center";
|
|
7532
|
+
(!n || !t) && (d.current = null);
|
|
7533
|
+
let y = n && m !== null;
|
|
7534
|
+
if (!e || !f || !g || !_ || !m && !v) return;
|
|
7535
|
+
let b = v ? ja(f.ownerDocument.activeElement, f) : null, x = () => v ? ja(i?.current, f) ?? ja(b, f) : null, S = () => ka(c.current, m ? s.current : Ea), C = () => {
|
|
7536
|
+
f.style.translate = Sa(S());
|
|
7537
|
+
}, w = () => {
|
|
7538
|
+
let e = Aa(f, g);
|
|
7539
|
+
if (p.current && d.current) {
|
|
7540
|
+
c.current = {
|
|
7541
|
+
x: d.current.left - e.left,
|
|
7542
|
+
y: d.current.top - e.top
|
|
7543
|
+
}, s.current = Ea, f.dataset.placement = "remembered", f.style.transformOrigin = "";
|
|
7426
7544
|
return;
|
|
7427
7545
|
}
|
|
7428
|
-
let
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7546
|
+
let t = Ma(f) ? x() : null, n = v && t ? yn(r, t.getBoundingClientRect(), {
|
|
7547
|
+
size: {
|
|
7548
|
+
width: e.width,
|
|
7549
|
+
height: e.height
|
|
7550
|
+
},
|
|
7551
|
+
bounds: Da(g),
|
|
7552
|
+
margin: l.current,
|
|
7553
|
+
gap: l.current
|
|
7554
|
+
}) : null;
|
|
7555
|
+
c.current = n ? {
|
|
7556
|
+
x: n.left - e.left,
|
|
7557
|
+
y: n.top - e.top
|
|
7558
|
+
} : Ea, f.dataset.placement = n?.side ?? "center", f.style.transformOrigin = n ? Oa[n.side] : "";
|
|
7559
|
+
}, T = () => {
|
|
7560
|
+
let e = s.current;
|
|
7561
|
+
if (!m || !p.current && e.x === 0 && e.y === 0) return;
|
|
7562
|
+
let t = S(), n = xa(t, t, f.getBoundingClientRect(), m.getBoundingClientRect(), Da(g), l.current);
|
|
7563
|
+
if (s.current = {
|
|
7564
|
+
x: n.x - c.current.x,
|
|
7565
|
+
y: n.y - c.current.y
|
|
7566
|
+
}, C(), p.current) {
|
|
7567
|
+
let e = Aa(f, g);
|
|
7568
|
+
d.current = {
|
|
7569
|
+
left: e.left + n.x,
|
|
7570
|
+
top: e.top + n.y
|
|
7571
|
+
};
|
|
7572
|
+
}
|
|
7573
|
+
}, E = () => {
|
|
7574
|
+
l.current = Na(f), Ma(f) || (u.current = null, s.current = Ea, p.current = !1, d.current = null), u.current || w(), C(), T();
|
|
7575
|
+
}, D = 0, O = () => {
|
|
7576
|
+
D ||= _.requestAnimationFrame(() => {
|
|
7577
|
+
D = 0, E();
|
|
7578
|
+
});
|
|
7579
|
+
}, k = (e) => {
|
|
7580
|
+
e.target === f && T();
|
|
7581
|
+
}, A = "ResizeObserver" in _ ? new _.ResizeObserver(O) : null;
|
|
7582
|
+
return p.current = y && d.current !== null, E(), _.addEventListener("resize", O), _.addEventListener("scroll", O, {
|
|
7583
|
+
capture: !0,
|
|
7584
|
+
passive: !0
|
|
7585
|
+
}), f.addEventListener("animationend", k), A?.observe(f), () => {
|
|
7586
|
+
_.cancelAnimationFrame(D), _.removeEventListener("resize", O), _.removeEventListener("scroll", O, { capture: !0 }), f.removeEventListener("animationend", k), A?.disconnect(), u.current = null, c.current = Ea, s.current = Ea, p.current = !1, f.style.translate = "", f.style.transformOrigin = "", delete f.dataset.placement;
|
|
7433
7587
|
};
|
|
7434
7588
|
}, [
|
|
7435
7589
|
e,
|
|
7590
|
+
h,
|
|
7436
7591
|
t,
|
|
7437
|
-
n
|
|
7592
|
+
n,
|
|
7593
|
+
r,
|
|
7594
|
+
i,
|
|
7595
|
+
a,
|
|
7596
|
+
o
|
|
7438
7597
|
]);
|
|
7439
|
-
let
|
|
7440
|
-
let
|
|
7441
|
-
if (!
|
|
7442
|
-
let
|
|
7443
|
-
|
|
7598
|
+
let g = (e) => {
|
|
7599
|
+
let t = a.current, n = e.currentTarget, r = t?.parentElement;
|
|
7600
|
+
if (!t || !r || e.button !== 0 || !e.isPrimary) return;
|
|
7601
|
+
let i = e.target.closest(Ta);
|
|
7602
|
+
i && n.contains(i) || !Ma(t) || (e.preventDefault(), n.setPointerCapture(e.pointerId), u.current = {
|
|
7444
7603
|
pointerId: e.pointerId,
|
|
7445
7604
|
startX: e.clientX,
|
|
7446
7605
|
startY: e.clientY,
|
|
7447
|
-
origin:
|
|
7448
|
-
dialog:
|
|
7449
|
-
handle:
|
|
7450
|
-
bounds:
|
|
7606
|
+
origin: ka(c.current, s.current),
|
|
7607
|
+
dialog: t.getBoundingClientRect(),
|
|
7608
|
+
handle: n.getBoundingClientRect(),
|
|
7609
|
+
bounds: Da(r),
|
|
7610
|
+
margin: l.current,
|
|
7611
|
+
moved: !1
|
|
7451
7612
|
});
|
|
7452
|
-
},
|
|
7453
|
-
let
|
|
7454
|
-
if (!
|
|
7455
|
-
let
|
|
7456
|
-
x:
|
|
7457
|
-
y:
|
|
7458
|
-
},
|
|
7459
|
-
r.
|
|
7460
|
-
|
|
7461
|
-
|
|
7613
|
+
}, _ = (e) => {
|
|
7614
|
+
let t = u.current, n = a.current;
|
|
7615
|
+
if (!t || t.pointerId !== e.pointerId || !n) return;
|
|
7616
|
+
let r = xa({
|
|
7617
|
+
x: t.origin.x + e.clientX - t.startX,
|
|
7618
|
+
y: t.origin.y + e.clientY - t.startY
|
|
7619
|
+
}, t.origin, t.dialog, t.handle, t.bounds, t.margin);
|
|
7620
|
+
t.moved ||= r.x !== t.origin.x || r.y !== t.origin.y, s.current = {
|
|
7621
|
+
x: r.x - c.current.x,
|
|
7622
|
+
y: r.y - c.current.y
|
|
7623
|
+
}, n.style.translate = Sa(r);
|
|
7624
|
+
}, v = (e) => {
|
|
7625
|
+
let t = u.current;
|
|
7626
|
+
if (t?.pointerId !== e.pointerId) return;
|
|
7627
|
+
u.current = null;
|
|
7628
|
+
let r = a.current, i = r?.parentElement;
|
|
7629
|
+
if (!n || !t.moved || !r || !i) return;
|
|
7630
|
+
let o = ka(c.current, s.current), l = Aa(r, i);
|
|
7631
|
+
d.current = {
|
|
7632
|
+
left: l.left + o.x,
|
|
7633
|
+
top: l.top + o.y
|
|
7634
|
+
}, c.current = o, s.current = Ea, p.current = !0, r.dataset.placement = "remembered", r.style.transformOrigin = "";
|
|
7462
7635
|
};
|
|
7463
|
-
if (
|
|
7464
|
-
onPointerDown:
|
|
7465
|
-
onPointerMove:
|
|
7466
|
-
onPointerUp:
|
|
7467
|
-
onPointerCancel:
|
|
7468
|
-
onLostPointerCapture:
|
|
7636
|
+
if (h) return {
|
|
7637
|
+
onPointerDown: g,
|
|
7638
|
+
onPointerMove: _,
|
|
7639
|
+
onPointerUp: v,
|
|
7640
|
+
onPointerCancel: v,
|
|
7641
|
+
onLostPointerCapture: v
|
|
7469
7642
|
};
|
|
7470
7643
|
}
|
|
7471
|
-
function
|
|
7472
|
-
let
|
|
7473
|
-
ft(
|
|
7474
|
-
initialFocusRef:
|
|
7475
|
-
returnFocusRef:
|
|
7644
|
+
function Fa({ open: e, onClose: t, title: n, children: r, footer: i, className: a, size: o = "sm", draggable: s = !1, rememberPosition: c = !1, placement: d = "center", anchorRef: f, role: p = "dialog", description: h, "aria-label": g, "aria-describedby": y, initialFocusRef: b, returnFocusRef: x, busy: S = !1, closeOnEscape: C = !0, closeOnOverlayClick: w = !0, hideCloseButton: T = !1 }) {
|
|
7645
|
+
let E = an(), D = m(null), O = m(null), k = u(), A = u();
|
|
7646
|
+
ft(D, e, {
|
|
7647
|
+
initialFocusRef: b,
|
|
7648
|
+
returnFocusRef: x
|
|
7476
7649
|
});
|
|
7477
|
-
let
|
|
7650
|
+
let j = Pa({
|
|
7651
|
+
open: e,
|
|
7652
|
+
draggable: s,
|
|
7653
|
+
remember: c,
|
|
7654
|
+
placement: d,
|
|
7655
|
+
anchorRef: f
|
|
7656
|
+
}, D, O);
|
|
7478
7657
|
return l(() => {
|
|
7479
7658
|
if (!e) return;
|
|
7480
7659
|
let n = (e) => {
|
|
7481
|
-
e.key === "Escape" &&
|
|
7660
|
+
e.key === "Escape" && C && !S && (e.preventDefault(), t());
|
|
7482
7661
|
};
|
|
7483
7662
|
document.addEventListener("keydown", n);
|
|
7484
7663
|
let r = document.body.style.overflow;
|
|
@@ -7488,60 +7667,69 @@ function Sa({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
7488
7667
|
}, [
|
|
7489
7668
|
e,
|
|
7490
7669
|
t,
|
|
7491
|
-
|
|
7492
|
-
|
|
7670
|
+
C,
|
|
7671
|
+
S
|
|
7493
7672
|
]), e ? H(/* @__PURE__ */ v("div", {
|
|
7494
7673
|
className: "fixed inset-0 z-50 flex items-start justify-center overflow-y-auto pt-4 md:pt-[5vh]",
|
|
7495
7674
|
children: [/* @__PURE__ */ _("div", {
|
|
7496
7675
|
className: "bg-bg-overlay fixed inset-0",
|
|
7497
7676
|
onClick: () => {
|
|
7498
|
-
|
|
7677
|
+
w && !S && t();
|
|
7499
7678
|
},
|
|
7500
7679
|
"aria-hidden": "true"
|
|
7501
7680
|
}), /* @__PURE__ */ v("div", {
|
|
7502
|
-
ref:
|
|
7503
|
-
className: G(
|
|
7504
|
-
role:
|
|
7681
|
+
ref: D,
|
|
7682
|
+
className: G(`relative z-50 mx-1 mb-8 flex w-full ${Ca[o]} flex-col`, "bg-bg-secondary border-border rounded-lg border", "animate-scale-in shadow-lg", a),
|
|
7683
|
+
role: p,
|
|
7505
7684
|
tabIndex: -1,
|
|
7506
|
-
"aria-busy":
|
|
7685
|
+
"aria-busy": S || void 0,
|
|
7507
7686
|
"aria-modal": "true",
|
|
7508
|
-
"aria-labelledby": n ?
|
|
7509
|
-
"aria-label":
|
|
7510
|
-
"aria-describedby": [
|
|
7687
|
+
"aria-labelledby": n ? k : void 0,
|
|
7688
|
+
"aria-label": g ?? (n ? void 0 : "Dialog"),
|
|
7689
|
+
"aria-describedby": [h ? A : void 0, y].filter(Boolean).join(" ") || void 0,
|
|
7511
7690
|
children: [
|
|
7512
|
-
/* @__PURE__ */ v("div", {
|
|
7513
|
-
ref:
|
|
7514
|
-
|
|
7515
|
-
|
|
7691
|
+
(n || !T || s) && /* @__PURE__ */ v("div", {
|
|
7692
|
+
ref: O,
|
|
7693
|
+
"data-control-size": E,
|
|
7694
|
+
className: G("ui-bar border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2.5", s && "md:cursor-move md:touch-none md:select-none"),
|
|
7695
|
+
...j,
|
|
7516
7696
|
children: [n && /* @__PURE__ */ _("h3", {
|
|
7517
|
-
id:
|
|
7518
|
-
className: "text-text-primary text-sm font-
|
|
7697
|
+
id: k,
|
|
7698
|
+
className: "text-text-primary min-w-0 text-sm font-medium",
|
|
7519
7699
|
children: n
|
|
7520
|
-
}), !
|
|
7700
|
+
}), !T && /* @__PURE__ */ _(fn, {
|
|
7521
7701
|
type: "button",
|
|
7522
|
-
"
|
|
7702
|
+
variant: "icon",
|
|
7703
|
+
size: "sm",
|
|
7704
|
+
"aria-disabled": S || void 0,
|
|
7523
7705
|
onClick: () => {
|
|
7524
|
-
|
|
7706
|
+
S || t();
|
|
7525
7707
|
},
|
|
7526
|
-
className: "
|
|
7708
|
+
className: "ml-auto shrink-0",
|
|
7527
7709
|
"aria-label": "Close",
|
|
7528
7710
|
children: /* @__PURE__ */ _(V, { className: "h-4 w-4" })
|
|
7529
7711
|
})]
|
|
7530
7712
|
}),
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7713
|
+
/* @__PURE__ */ v("div", {
|
|
7714
|
+
className: "ui-surface-body p-3",
|
|
7715
|
+
children: [h && /* @__PURE__ */ _("div", {
|
|
7716
|
+
id: A,
|
|
7717
|
+
className: "text-text-secondary mb-3 text-xs",
|
|
7718
|
+
children: h
|
|
7719
|
+
}), r]
|
|
7535
7720
|
}),
|
|
7536
|
-
|
|
7537
|
-
|
|
7721
|
+
i && /* @__PURE__ */ _("div", {
|
|
7722
|
+
"data-control-size": E,
|
|
7723
|
+
className: "ui-bar border-border bg-bg-primary/50 flex shrink-0 flex-col justify-center rounded-b-lg border-t px-3 py-2.5",
|
|
7724
|
+
children: i
|
|
7725
|
+
})
|
|
7538
7726
|
]
|
|
7539
7727
|
})]
|
|
7540
7728
|
}), document.body) : null;
|
|
7541
7729
|
}
|
|
7542
7730
|
//#endregion
|
|
7543
7731
|
//#region src/components/ui/DialogActions.tsx
|
|
7544
|
-
function
|
|
7732
|
+
function Ia({ onCancel: e, onConfirm: t, cancelLabel: n = "Cancel", confirmLabel: r = "Confirm", confirmVariant: i = "primary", className: a, busy: o = !1, busyLabel: s = "Working…", cancelRef: c, confirmRef: l, confirmDisabled: u = !1 }) {
|
|
7545
7733
|
return /* @__PURE__ */ v("div", {
|
|
7546
7734
|
className: G("flex justify-end gap-2", a),
|
|
7547
7735
|
"aria-busy": o || void 0,
|
|
@@ -7570,7 +7758,7 @@ function Ca({ onCancel: e, onConfirm: t, cancelLabel: n = "Cancel", confirmLabel
|
|
|
7570
7758
|
}
|
|
7571
7759
|
//#endregion
|
|
7572
7760
|
//#region src/components/ui/DividerLabel.tsx
|
|
7573
|
-
function
|
|
7761
|
+
function La({ children: e, className: t }) {
|
|
7574
7762
|
return /* @__PURE__ */ v("div", {
|
|
7575
7763
|
className: G("my-6 flex items-center gap-3", t),
|
|
7576
7764
|
children: [
|
|
@@ -7585,7 +7773,7 @@ function wa({ children: e, className: t }) {
|
|
|
7585
7773
|
}
|
|
7586
7774
|
//#endregion
|
|
7587
7775
|
//#region src/components/ui/DropdownMenu.tsx
|
|
7588
|
-
function
|
|
7776
|
+
function Ra({ trigger: e, items: t, align: n = "right" }) {
|
|
7589
7777
|
let [r, i] = h(!1), [a, o] = h({
|
|
7590
7778
|
top: 0,
|
|
7591
7779
|
left: 0,
|
|
@@ -7666,7 +7854,7 @@ function Ta({ trigger: e, items: t, align: n = "right" }) {
|
|
|
7666
7854
|
}
|
|
7667
7855
|
//#endregion
|
|
7668
7856
|
//#region src/components/ui/EmptyState.tsx
|
|
7669
|
-
function
|
|
7857
|
+
function za({ icon: e, title: t, description: n, action: r, className: i }) {
|
|
7670
7858
|
return /* @__PURE__ */ v("div", {
|
|
7671
7859
|
className: G("flex flex-col items-center justify-center px-4 py-12", i),
|
|
7672
7860
|
children: [
|
|
@@ -7691,7 +7879,7 @@ function Ea({ icon: e, title: t, description: n, action: r, className: i }) {
|
|
|
7691
7879
|
}
|
|
7692
7880
|
//#endregion
|
|
7693
7881
|
//#region src/components/ui/ErrorBoundary.tsx
|
|
7694
|
-
var
|
|
7882
|
+
var Ba = class extends e {
|
|
7695
7883
|
state = {
|
|
7696
7884
|
hasError: !1,
|
|
7697
7885
|
error: null
|
|
@@ -7733,10 +7921,10 @@ var Da = class extends e {
|
|
|
7733
7921
|
};
|
|
7734
7922
|
//#endregion
|
|
7735
7923
|
//#region src/components/ui/FilterDropdown.tsx
|
|
7736
|
-
function
|
|
7737
|
-
return /* @__PURE__ */ _(
|
|
7924
|
+
function Va({ icon: e, children: t, items: n, align: r, className: i }) {
|
|
7925
|
+
return /* @__PURE__ */ _(Ra, {
|
|
7738
7926
|
align: r,
|
|
7739
|
-
trigger: /* @__PURE__ */ _(
|
|
7927
|
+
trigger: /* @__PURE__ */ _(Bn, {
|
|
7740
7928
|
icon: e,
|
|
7741
7929
|
className: i,
|
|
7742
7930
|
children: t
|
|
@@ -7746,7 +7934,7 @@ function Oa({ icon: e, children: t, items: n, align: r, className: i }) {
|
|
|
7746
7934
|
}
|
|
7747
7935
|
//#endregion
|
|
7748
7936
|
//#region src/components/ui/Kbd.tsx
|
|
7749
|
-
function
|
|
7937
|
+
function Ha({ children: e, className: t }) {
|
|
7750
7938
|
return /* @__PURE__ */ _("kbd", {
|
|
7751
7939
|
className: G("text-2xs inline-flex items-center px-1.5 py-0.5 font-mono font-medium", "bg-bg-tertiary text-text-secondary border-border rounded border", t),
|
|
7752
7940
|
children: e
|
|
@@ -7754,20 +7942,20 @@ function ka({ children: e, className: t }) {
|
|
|
7754
7942
|
}
|
|
7755
7943
|
//#endregion
|
|
7756
7944
|
//#region src/components/ui/LoadingSpinner.tsx
|
|
7757
|
-
var
|
|
7945
|
+
var Ua = {
|
|
7758
7946
|
sm: "w-4 h-4",
|
|
7759
7947
|
md: "w-6 h-6",
|
|
7760
7948
|
lg: "w-8 h-8"
|
|
7761
7949
|
};
|
|
7762
|
-
function
|
|
7950
|
+
function Wa({ className: e, size: t = "md" }) {
|
|
7763
7951
|
return /* @__PURE__ */ _("div", {
|
|
7764
7952
|
className: G("flex min-h-[200px] items-center justify-center", e),
|
|
7765
|
-
children: /* @__PURE__ */ _(L, { className: G("text-accent animate-spin",
|
|
7953
|
+
children: /* @__PURE__ */ _(L, { className: G("text-accent animate-spin", Ua[t]) })
|
|
7766
7954
|
});
|
|
7767
7955
|
}
|
|
7768
7956
|
//#endregion
|
|
7769
7957
|
//#region src/components/ui/MetadataGrid.tsx
|
|
7770
|
-
function
|
|
7958
|
+
function Ga({ items: e, labelWidth: n = "100px", className: r }) {
|
|
7771
7959
|
return /* @__PURE__ */ _("div", {
|
|
7772
7960
|
className: G("gap-x-3 gap-y-2 text-xs", r),
|
|
7773
7961
|
style: {
|
|
@@ -7785,7 +7973,7 @@ function Ma({ items: e, labelWidth: n = "100px", className: r }) {
|
|
|
7785
7973
|
}
|
|
7786
7974
|
//#endregion
|
|
7787
7975
|
//#region src/components/ui/MetricCard.tsx
|
|
7788
|
-
function
|
|
7976
|
+
function Ka({ label: e, value: t, sub: n, trend: r, bar: i, icon: a, iconColor: o, className: s }) {
|
|
7789
7977
|
let c = r?.tone === "positive" ? "text-green" : r?.tone === "negative" ? "text-red" : "text-text-tertiary";
|
|
7790
7978
|
return /* @__PURE__ */ v("div", {
|
|
7791
7979
|
className: G("bg-bg-secondary border-border relative overflow-hidden rounded-md border p-3", s),
|
|
@@ -7825,7 +8013,7 @@ function Na({ label: e, value: t, sub: n, trend: r, bar: i, icon: a, iconColor:
|
|
|
7825
8013
|
}
|
|
7826
8014
|
//#endregion
|
|
7827
8015
|
//#region src/components/ui/OAuthButton.tsx
|
|
7828
|
-
function
|
|
8016
|
+
function qa() {
|
|
7829
8017
|
return /* @__PURE__ */ v("svg", {
|
|
7830
8018
|
className: "h-3.5 w-3.5",
|
|
7831
8019
|
viewBox: "0 0 24 24",
|
|
@@ -7850,7 +8038,7 @@ function Pa() {
|
|
|
7850
8038
|
]
|
|
7851
8039
|
});
|
|
7852
8040
|
}
|
|
7853
|
-
function
|
|
8041
|
+
function Ja() {
|
|
7854
8042
|
return /* @__PURE__ */ _("svg", {
|
|
7855
8043
|
className: "h-3.5 w-3.5",
|
|
7856
8044
|
viewBox: "0 0 24 24",
|
|
@@ -7859,25 +8047,25 @@ function Fa() {
|
|
|
7859
8047
|
children: /* @__PURE__ */ _("path", { d: "M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" })
|
|
7860
8048
|
});
|
|
7861
8049
|
}
|
|
7862
|
-
var
|
|
8050
|
+
var Ya = {
|
|
7863
8051
|
github: "GitHub",
|
|
7864
8052
|
google: "Google"
|
|
7865
|
-
},
|
|
7866
|
-
github:
|
|
7867
|
-
google:
|
|
8053
|
+
}, Xa = {
|
|
8054
|
+
github: Ja,
|
|
8055
|
+
google: qa
|
|
7868
8056
|
};
|
|
7869
|
-
function
|
|
7870
|
-
let r =
|
|
8057
|
+
function Za({ provider: e, children: t, ...n }) {
|
|
8058
|
+
let r = Xa[e];
|
|
7871
8059
|
return /* @__PURE__ */ v(fn, {
|
|
7872
8060
|
variant: "secondary",
|
|
7873
8061
|
size: "md",
|
|
7874
8062
|
...n,
|
|
7875
|
-
children: [/* @__PURE__ */ _(r, {}), t ??
|
|
8063
|
+
children: [/* @__PURE__ */ _(r, {}), t ?? Ya[e]]
|
|
7876
8064
|
});
|
|
7877
8065
|
}
|
|
7878
8066
|
//#endregion
|
|
7879
8067
|
//#region src/components/ui/PageHeader.tsx
|
|
7880
|
-
function
|
|
8068
|
+
function Qa({ title: e, subtitle: t, actions: n, className: r, eyebrow: i, headingLevel: a = 1, wrap: o = !1 }) {
|
|
7881
8069
|
let s = `h${a}`;
|
|
7882
8070
|
return /* @__PURE__ */ v("div", {
|
|
7883
8071
|
className: G("flex items-center justify-between gap-3", o && "flex-wrap", r),
|
|
@@ -7905,7 +8093,7 @@ function za({ title: e, subtitle: t, actions: n, className: r, eyebrow: i, headi
|
|
|
7905
8093
|
}
|
|
7906
8094
|
//#endregion
|
|
7907
8095
|
//#region src/components/ui/PageSection.tsx
|
|
7908
|
-
function
|
|
8096
|
+
function $a({ title: e, description: t, actions: n, children: r, as: i = "h2", className: a, headerClassName: o, contentClassName: s }) {
|
|
7909
8097
|
return /* @__PURE__ */ v("section", {
|
|
7910
8098
|
className: G("space-y-4", a),
|
|
7911
8099
|
children: [(e || t || n) && /* @__PURE__ */ v("div", {
|
|
@@ -7931,7 +8119,7 @@ function Ba({ title: e, description: t, actions: n, children: r, as: i = "h2", c
|
|
|
7931
8119
|
}
|
|
7932
8120
|
//#endregion
|
|
7933
8121
|
//#region src/components/ui/PaginationBar.tsx
|
|
7934
|
-
var
|
|
8122
|
+
var eo = [
|
|
7935
8123
|
{
|
|
7936
8124
|
value: "10",
|
|
7937
8125
|
label: "10 per page"
|
|
@@ -7945,13 +8133,13 @@ var Va = [
|
|
|
7945
8133
|
label: "50 per page"
|
|
7946
8134
|
}
|
|
7947
8135
|
];
|
|
7948
|
-
function
|
|
8136
|
+
function to({ page: e, pageSize: t, total: n, pageSizeOptions: r = eo, onPageChange: i, onPageSizeChange: a, className: o }) {
|
|
7949
8137
|
let s = Math.ceil(n / t), c = Math.min((e - 1) * t + 1, n), l = Math.min(e * t, n);
|
|
7950
8138
|
return /* @__PURE__ */ v("div", {
|
|
7951
8139
|
className: G("flex items-center justify-between", o),
|
|
7952
8140
|
children: [/* @__PURE__ */ v("div", {
|
|
7953
8141
|
className: "flex items-center gap-3",
|
|
7954
|
-
children: [/* @__PURE__ */ _(
|
|
8142
|
+
children: [/* @__PURE__ */ _(xn, {
|
|
7955
8143
|
size: "sm",
|
|
7956
8144
|
value: String(t),
|
|
7957
8145
|
onChange: (e) => a(Number(e)),
|
|
@@ -7967,7 +8155,7 @@ function Ha({ page: e, pageSize: t, total: n, pageSizeOptions: r = Va, onPageCha
|
|
|
7967
8155
|
n
|
|
7968
8156
|
]
|
|
7969
8157
|
})]
|
|
7970
|
-
}), /* @__PURE__ */ _(
|
|
8158
|
+
}), /* @__PURE__ */ _(Un, {
|
|
7971
8159
|
page: e,
|
|
7972
8160
|
totalPages: s,
|
|
7973
8161
|
onPageChange: i
|
|
@@ -7976,21 +8164,21 @@ function Ha({ page: e, pageSize: t, total: n, pageSizeOptions: r = Va, onPageCha
|
|
|
7976
8164
|
}
|
|
7977
8165
|
//#endregion
|
|
7978
8166
|
//#region src/components/ui/useFieldControl.ts
|
|
7979
|
-
function
|
|
7980
|
-
let o = u(), s = c(
|
|
8167
|
+
function no({ id: e, error: t, hint: n, describedBy: r, invalid: i, required: a }) {
|
|
8168
|
+
let o = u(), s = c(Ln), l = e ?? s?.id ?? o, d = t ? `${l}-error` : void 0, f = n ? `${l}-hint` : void 0;
|
|
7981
8169
|
return {
|
|
7982
8170
|
inputId: l,
|
|
7983
8171
|
errorId: d,
|
|
7984
8172
|
hintId: f,
|
|
7985
|
-
describedBy:
|
|
8173
|
+
describedBy: Rn(r, s?.describedBy, f, d),
|
|
7986
8174
|
invalid: i ?? (!!t || s?.invalid || void 0),
|
|
7987
8175
|
required: a ?? s?.required
|
|
7988
8176
|
};
|
|
7989
8177
|
}
|
|
7990
8178
|
//#endregion
|
|
7991
8179
|
//#region src/components/ui/PasswordInput.tsx
|
|
7992
|
-
var
|
|
7993
|
-
let d =
|
|
8180
|
+
var ro = a(({ label: e, error: t, className: n, id: r, hint: i, controlSize: a, required: o, "aria-describedby": s, "aria-invalid": c, ...l }, u) => {
|
|
8181
|
+
let d = no({
|
|
7994
8182
|
id: r,
|
|
7995
8183
|
error: t,
|
|
7996
8184
|
hint: i,
|
|
@@ -8010,7 +8198,7 @@ var Wa = a(({ label: e, error: t, className: n, id: r, hint: i, controlSize: a,
|
|
|
8010
8198
|
className: "flex items-center justify-between",
|
|
8011
8199
|
children: [e && /* @__PURE__ */ _("label", {
|
|
8012
8200
|
htmlFor: f,
|
|
8013
|
-
className: "
|
|
8201
|
+
className: "ui-field-label text-xs font-medium",
|
|
8014
8202
|
children: e
|
|
8015
8203
|
}), t && /* @__PURE__ */ _("p", {
|
|
8016
8204
|
id: p,
|
|
@@ -8042,8 +8230,8 @@ var Wa = a(({ label: e, error: t, className: n, id: r, hint: i, controlSize: a,
|
|
|
8042
8230
|
]
|
|
8043
8231
|
});
|
|
8044
8232
|
});
|
|
8045
|
-
|
|
8046
|
-
var
|
|
8233
|
+
ro.displayName = "PasswordInput";
|
|
8234
|
+
var io = Object.freeze([
|
|
8047
8235
|
{
|
|
8048
8236
|
label: "At least 8 characters",
|
|
8049
8237
|
test: (e) => e.length >= 8
|
|
@@ -8061,12 +8249,12 @@ var Ga = Object.freeze([
|
|
|
8061
8249
|
test: (e) => /\d/.test(e)
|
|
8062
8250
|
}
|
|
8063
8251
|
]);
|
|
8064
|
-
function
|
|
8252
|
+
function ao(e, t = io) {
|
|
8065
8253
|
return t.every((t) => t.test(e));
|
|
8066
8254
|
}
|
|
8067
8255
|
//#endregion
|
|
8068
8256
|
//#region src/components/ui/PasswordRequirements.tsx
|
|
8069
|
-
function
|
|
8257
|
+
function oo({ password: e, requirements: t = io, showWhenEmpty: n = !1, className: r }) {
|
|
8070
8258
|
return !n && e.length === 0 ? null : /* @__PURE__ */ _("ul", {
|
|
8071
8259
|
"aria-label": "Password requirements",
|
|
8072
8260
|
className: G("space-y-1", r),
|
|
@@ -8093,7 +8281,7 @@ function qa({ password: e, requirements: t = Ga, showWhenEmpty: n = !1, classNam
|
|
|
8093
8281
|
}
|
|
8094
8282
|
//#endregion
|
|
8095
8283
|
//#region src/components/ui/ProfileHeader.tsx
|
|
8096
|
-
function
|
|
8284
|
+
function so({ name: e, subtitle: t, badge: n, meta: r, action: i, className: a }) {
|
|
8097
8285
|
return /* @__PURE__ */ v("div", {
|
|
8098
8286
|
className: G("flex items-start gap-4", a),
|
|
8099
8287
|
children: [
|
|
@@ -8141,7 +8329,7 @@ function Ja({ name: e, subtitle: t, badge: n, meta: r, action: i, className: a }
|
|
|
8141
8329
|
}
|
|
8142
8330
|
//#endregion
|
|
8143
8331
|
//#region src/components/ui/ProseContent.tsx
|
|
8144
|
-
function
|
|
8332
|
+
function co({ children: e, className: t }) {
|
|
8145
8333
|
return /* @__PURE__ */ _("div", {
|
|
8146
8334
|
className: G("ui-prose", t),
|
|
8147
8335
|
children: e
|
|
@@ -8149,21 +8337,21 @@ function Ya({ children: e, className: t }) {
|
|
|
8149
8337
|
}
|
|
8150
8338
|
//#endregion
|
|
8151
8339
|
//#region src/lib/qrCode.ts
|
|
8152
|
-
var
|
|
8340
|
+
var lo = class extends RangeError {
|
|
8153
8341
|
constructor() {
|
|
8154
8342
|
super("Text is too long to encode as a QR code"), this.name = "QrCapacityError";
|
|
8155
8343
|
}
|
|
8156
|
-
},
|
|
8344
|
+
}, uo = {
|
|
8157
8345
|
L: 0,
|
|
8158
8346
|
M: 1,
|
|
8159
8347
|
Q: 2,
|
|
8160
8348
|
H: 3
|
|
8161
|
-
},
|
|
8349
|
+
}, fo = {
|
|
8162
8350
|
L: 1,
|
|
8163
8351
|
M: 0,
|
|
8164
8352
|
Q: 3,
|
|
8165
8353
|
H: 2
|
|
8166
|
-
},
|
|
8354
|
+
}, po = [
|
|
8167
8355
|
[
|
|
8168
8356
|
-1,
|
|
8169
8357
|
7,
|
|
@@ -8336,7 +8524,7 @@ var Xa = class extends RangeError {
|
|
|
8336
8524
|
30,
|
|
8337
8525
|
30
|
|
8338
8526
|
]
|
|
8339
|
-
],
|
|
8527
|
+
], mo = [
|
|
8340
8528
|
[
|
|
8341
8529
|
-1,
|
|
8342
8530
|
1,
|
|
@@ -8510,7 +8698,7 @@ var Xa = class extends RangeError {
|
|
|
8510
8698
|
81
|
|
8511
8699
|
]
|
|
8512
8700
|
];
|
|
8513
|
-
function
|
|
8701
|
+
function ho(e) {
|
|
8514
8702
|
let t = (16 * e + 128) * e + 64;
|
|
8515
8703
|
if (e >= 2) {
|
|
8516
8704
|
let n = Math.floor(e / 7) + 2;
|
|
@@ -8518,43 +8706,43 @@ function to(e) {
|
|
|
8518
8706
|
}
|
|
8519
8707
|
return t;
|
|
8520
8708
|
}
|
|
8521
|
-
function
|
|
8522
|
-
let n =
|
|
8523
|
-
return Math.floor(
|
|
8709
|
+
function go(e, t) {
|
|
8710
|
+
let n = uo[t];
|
|
8711
|
+
return Math.floor(ho(e) / 8) - po[n][e] * mo[n][e];
|
|
8524
8712
|
}
|
|
8525
|
-
function
|
|
8713
|
+
function _o(e) {
|
|
8526
8714
|
if (e === 1) return [];
|
|
8527
8715
|
let t = Math.floor(e / 7) + 2, n = Math.floor((e * 8 + t * 3 + 5) / (t * 4 - 4)) * 2, r = [6];
|
|
8528
8716
|
for (let i = e * 4 + 17 - 7; r.length < t; i -= n) r.splice(1, 0, i);
|
|
8529
8717
|
return r;
|
|
8530
8718
|
}
|
|
8531
|
-
function
|
|
8719
|
+
function vo(e, t) {
|
|
8532
8720
|
let n = 0;
|
|
8533
8721
|
for (let r = 7; r >= 0; r--) n = n << 1 ^ (n >>> 7) * 285, n ^= (t >>> r & 1) * e;
|
|
8534
8722
|
return n;
|
|
8535
8723
|
}
|
|
8536
|
-
function
|
|
8724
|
+
function yo(e) {
|
|
8537
8725
|
let t = Array(e).fill(0);
|
|
8538
8726
|
t[e - 1] = 1;
|
|
8539
8727
|
let n = 1;
|
|
8540
8728
|
for (let r = 0; r < e; r++) {
|
|
8541
|
-
for (let e = 0; e < t.length; e++) t[e] =
|
|
8542
|
-
n =
|
|
8729
|
+
for (let e = 0; e < t.length; e++) t[e] = vo(t[e], n), e + 1 < t.length && (t[e] ^= t[e + 1]);
|
|
8730
|
+
n = vo(n, 2);
|
|
8543
8731
|
}
|
|
8544
8732
|
return t;
|
|
8545
8733
|
}
|
|
8546
|
-
function
|
|
8734
|
+
function bo(e, t) {
|
|
8547
8735
|
let n = Array(t.length).fill(0);
|
|
8548
8736
|
for (let r of e) {
|
|
8549
8737
|
let e = r ^ n.shift();
|
|
8550
8738
|
n.push(0), t.forEach((t, r) => {
|
|
8551
|
-
n[r] ^=
|
|
8739
|
+
n[r] ^= vo(t, e);
|
|
8552
8740
|
});
|
|
8553
8741
|
}
|
|
8554
8742
|
return n;
|
|
8555
8743
|
}
|
|
8556
|
-
function
|
|
8557
|
-
let r =
|
|
8744
|
+
function xo(e, t, n) {
|
|
8745
|
+
let r = go(t, n) * 8, i = [], a = (e, t) => {
|
|
8558
8746
|
for (let n = t - 1; n >= 0; n--) i.push(e >>> n & 1);
|
|
8559
8747
|
};
|
|
8560
8748
|
a(4, 4), a(e.length, t <= 9 ? 8 : 16);
|
|
@@ -8565,12 +8753,12 @@ function so(e, t, n) {
|
|
|
8565
8753
|
for (let e = 0; e < i.length; e += 8) o.push(i.slice(e, e + 8).reduce((e, t) => e << 1 | t));
|
|
8566
8754
|
return o;
|
|
8567
8755
|
}
|
|
8568
|
-
function
|
|
8569
|
-
let r =
|
|
8756
|
+
function So(e, t, n) {
|
|
8757
|
+
let r = uo[n], i = mo[r][t], a = po[r][t], o = Math.floor(ho(t) / 8), s = i - o % i, c = Math.floor(o / i), l = yo(a), u = [];
|
|
8570
8758
|
for (let t = 0, n = 0; t < i; t++) {
|
|
8571
8759
|
let r = c - a + (t < s ? 0 : 1), i = e.slice(n, n + r);
|
|
8572
8760
|
n += r;
|
|
8573
|
-
let o =
|
|
8761
|
+
let o = bo(i, l);
|
|
8574
8762
|
t < s && i.push(0), u.push(i.concat(o));
|
|
8575
8763
|
}
|
|
8576
8764
|
let d = [];
|
|
@@ -8579,7 +8767,7 @@ function co(e, t, n) {
|
|
|
8579
8767
|
});
|
|
8580
8768
|
return d;
|
|
8581
8769
|
}
|
|
8582
|
-
var
|
|
8770
|
+
var Co = class {
|
|
8583
8771
|
size;
|
|
8584
8772
|
modules;
|
|
8585
8773
|
isFunction;
|
|
@@ -8590,7 +8778,7 @@ var lo = class {
|
|
|
8590
8778
|
this.modules[t][e] = n, this.isFunction[t][e] = !0;
|
|
8591
8779
|
}
|
|
8592
8780
|
};
|
|
8593
|
-
function
|
|
8781
|
+
function wo(e, t) {
|
|
8594
8782
|
let { size: n } = e;
|
|
8595
8783
|
for (let t = 0; t < n; t++) e.setFunction(6, t, t % 2 == 0), e.setFunction(t, 6, t % 2 == 0);
|
|
8596
8784
|
for (let [t, r] of [
|
|
@@ -8603,15 +8791,15 @@ function uo(e, t) {
|
|
|
8603
8791
|
let c = Math.max(Math.abs(a), Math.abs(i));
|
|
8604
8792
|
e.setFunction(o, s, c !== 2 && c !== 4);
|
|
8605
8793
|
}
|
|
8606
|
-
let r =
|
|
8794
|
+
let r = _o(t), i = r.length - 1;
|
|
8607
8795
|
r.forEach((t, n) => {
|
|
8608
8796
|
r.forEach((r, a) => {
|
|
8609
8797
|
if (!(n === 0 && a === 0 || n === 0 && a === i || n === i && a === 0)) for (let n = -2; n <= 2; n++) for (let i = -2; i <= 2; i++) e.setFunction(t + i, r + n, Math.max(Math.abs(i), Math.abs(n)) !== 1);
|
|
8610
8798
|
});
|
|
8611
|
-
}),
|
|
8799
|
+
}), To(e, "M", 0), Eo(e, t);
|
|
8612
8800
|
}
|
|
8613
|
-
function
|
|
8614
|
-
let r =
|
|
8801
|
+
function To(e, t, n) {
|
|
8802
|
+
let r = fo[t] << 3 | n, i = r;
|
|
8615
8803
|
for (let e = 0; e < 10; e++) i = i << 1 ^ (i >>> 9) * 1335;
|
|
8616
8804
|
let a = (r << 10 | i) ^ 21522, o = (e) => (a >>> e & 1) != 0, { size: s } = e;
|
|
8617
8805
|
for (let t = 0; t <= 5; t++) e.setFunction(8, t, o(t));
|
|
@@ -8621,7 +8809,7 @@ function fo(e, t, n) {
|
|
|
8621
8809
|
for (let t = 8; t < 15; t++) e.setFunction(8, s - 15 + t, o(t));
|
|
8622
8810
|
e.setFunction(8, s - 8, !0);
|
|
8623
8811
|
}
|
|
8624
|
-
function
|
|
8812
|
+
function Eo(e, t) {
|
|
8625
8813
|
if (t < 7) return;
|
|
8626
8814
|
let n = t;
|
|
8627
8815
|
for (let e = 0; e < 12; e++) n = n << 1 ^ (n >>> 11) * 7973;
|
|
@@ -8631,7 +8819,7 @@ function po(e, t) {
|
|
|
8631
8819
|
e.setFunction(i, a, n), e.setFunction(a, i, n);
|
|
8632
8820
|
}
|
|
8633
8821
|
}
|
|
8634
|
-
function
|
|
8822
|
+
function Do(e, t) {
|
|
8635
8823
|
let { size: n } = e, r = 0;
|
|
8636
8824
|
for (let i = n - 1; i >= 1; i -= 2) {
|
|
8637
8825
|
i === 6 && (i = 5);
|
|
@@ -8645,7 +8833,7 @@ function mo(e, t) {
|
|
|
8645
8833
|
}
|
|
8646
8834
|
}
|
|
8647
8835
|
}
|
|
8648
|
-
var
|
|
8836
|
+
var Oo = [
|
|
8649
8837
|
(e, t) => (e + t) % 2 == 0,
|
|
8650
8838
|
(e, t) => t % 2 == 0,
|
|
8651
8839
|
(e) => e % 3 == 0,
|
|
@@ -8655,10 +8843,10 @@ var ho = [
|
|
|
8655
8843
|
(e, t) => (e * t % 2 + e * t % 3) % 2 == 0,
|
|
8656
8844
|
(e, t) => ((e + t) % 2 + e * t % 3) % 2 == 0
|
|
8657
8845
|
];
|
|
8658
|
-
function
|
|
8659
|
-
for (let n = 0; n < e.size; n++) for (let r = 0; r < e.size; r++) !e.isFunction[n][r] &&
|
|
8846
|
+
function ko(e, t) {
|
|
8847
|
+
for (let n = 0; n < e.size; n++) for (let r = 0; r < e.size; r++) !e.isFunction[n][r] && Oo[t](r, n) && (e.modules[n][r] = !e.modules[n][r]);
|
|
8660
8848
|
}
|
|
8661
|
-
var
|
|
8849
|
+
var Ao = [[
|
|
8662
8850
|
!0,
|
|
8663
8851
|
!1,
|
|
8664
8852
|
!0,
|
|
@@ -8683,12 +8871,12 @@ var _o = [[
|
|
|
8683
8871
|
!1,
|
|
8684
8872
|
!0
|
|
8685
8873
|
]];
|
|
8686
|
-
function
|
|
8874
|
+
function jo(e) {
|
|
8687
8875
|
let t = e.length, n = (t, n, r) => r ? e[t][n] : e[n][t], r = 0;
|
|
8688
8876
|
for (let e of [!1, !0]) for (let i = 0; i < t; i++) {
|
|
8689
8877
|
let a = 1;
|
|
8690
8878
|
for (let o = 1; o <= t; o++) o < t && n(o, i, e) === n(o - 1, i, e) ? a++ : (a >= 5 && (r += 3 + (a - 5)), a = 1);
|
|
8691
|
-
for (let a = 0; a + 11 <= t; a++) for (let t of
|
|
8879
|
+
for (let a = 0; a + 11 <= t; a++) for (let t of Ao) t.every((t, r) => n(a + r, i, e) === t) && (r += 40);
|
|
8692
8880
|
}
|
|
8693
8881
|
for (let n = 0; n < t - 1; n++) for (let i = 0; i < t - 1; i++) {
|
|
8694
8882
|
let t = e[n][i];
|
|
@@ -8697,20 +8885,20 @@ function vo(e) {
|
|
|
8697
8885
|
let i = e.reduce((e, t) => e + t.filter(Boolean).length, 0) * 100 / (t * t);
|
|
8698
8886
|
return r += Math.floor(Math.abs(i - 50) / 5) * 10, r;
|
|
8699
8887
|
}
|
|
8700
|
-
function
|
|
8701
|
-
if (!Object.hasOwn(
|
|
8888
|
+
function Mo(e, t = "M") {
|
|
8889
|
+
if (!Object.hasOwn(uo, t)) throw RangeError(`Invalid QR error correction level "${t}"; expected L, M, Q or H`);
|
|
8702
8890
|
let n = new TextEncoder().encode(e), r = 1;
|
|
8703
|
-
for (; r <= 40 && !(4 + (r <= 9 ? 8 : 16) + n.length * 8 <=
|
|
8704
|
-
if (r > 40) throw new
|
|
8705
|
-
let i =
|
|
8706
|
-
|
|
8891
|
+
for (; r <= 40 && !(4 + (r <= 9 ? 8 : 16) + n.length * 8 <= go(r, t) * 8); r++);
|
|
8892
|
+
if (r > 40) throw new lo();
|
|
8893
|
+
let i = So(xo(n, r, t), r, t), a = new Co(r * 4 + 17);
|
|
8894
|
+
wo(a, r), Do(a, i);
|
|
8707
8895
|
let o = 0, s = Infinity;
|
|
8708
8896
|
for (let e = 0; e < 8; e++) {
|
|
8709
|
-
|
|
8710
|
-
let n =
|
|
8711
|
-
n < s && (s = n, o = e),
|
|
8897
|
+
ko(a, e), To(a, t, e);
|
|
8898
|
+
let n = jo(a.modules);
|
|
8899
|
+
n < s && (s = n, o = e), ko(a, e);
|
|
8712
8900
|
}
|
|
8713
|
-
return
|
|
8901
|
+
return ko(a, o), To(a, t, o), {
|
|
8714
8902
|
size: a.size,
|
|
8715
8903
|
version: r,
|
|
8716
8904
|
modules: a.modules
|
|
@@ -8718,13 +8906,13 @@ function yo(e, t = "M") {
|
|
|
8718
8906
|
}
|
|
8719
8907
|
//#endregion
|
|
8720
8908
|
//#region src/components/ui/QrCode.tsx
|
|
8721
|
-
function
|
|
8909
|
+
function No({ value: e, errorCorrection: t = "M", size: n = 160, margin: r = 4, "aria-label": i = "QR code", fallback: a = null, className: o }) {
|
|
8722
8910
|
let s = p(() => {
|
|
8723
8911
|
if (!e) return null;
|
|
8724
8912
|
try {
|
|
8725
|
-
return
|
|
8913
|
+
return Mo(e, t);
|
|
8726
8914
|
} catch (e) {
|
|
8727
|
-
if (e instanceof
|
|
8915
|
+
if (e instanceof lo) return "too-long";
|
|
8728
8916
|
throw e;
|
|
8729
8917
|
}
|
|
8730
8918
|
}, [e, t]);
|
|
@@ -8758,7 +8946,7 @@ function bo({ value: e, errorCorrection: t = "M", size: n = 160, margin: r = 4,
|
|
|
8758
8946
|
}
|
|
8759
8947
|
//#endregion
|
|
8760
8948
|
//#region src/components/ui/SearchInput.tsx
|
|
8761
|
-
function
|
|
8949
|
+
function Po({ value: e, onChange: t, placeholder: n = "Search...", className: r }) {
|
|
8762
8950
|
return /* @__PURE__ */ v("div", {
|
|
8763
8951
|
className: G("relative", r),
|
|
8764
8952
|
children: [/* @__PURE__ */ _(B, { className: "text-text-tertiary absolute top-1/2 left-2 h-3.5 w-3.5 -translate-y-1/2" }), /* @__PURE__ */ _("input", {
|
|
@@ -8772,8 +8960,8 @@ function xo({ value: e, onChange: t, placeholder: n = "Search...", className: r
|
|
|
8772
8960
|
}
|
|
8773
8961
|
//#endregion
|
|
8774
8962
|
//#region src/components/ui/Select.tsx
|
|
8775
|
-
var
|
|
8776
|
-
let f =
|
|
8963
|
+
var Fo = a(({ label: e, error: t, options: n, className: r, id: i, hint: a, controlSize: o, required: s, "aria-describedby": c, "aria-invalid": l, ...u }, d) => {
|
|
8964
|
+
let f = no({
|
|
8777
8965
|
id: i,
|
|
8778
8966
|
error: t,
|
|
8779
8967
|
hint: a,
|
|
@@ -8793,7 +8981,7 @@ var So = a(({ label: e, error: t, options: n, className: r, id: i, hint: a, cont
|
|
|
8793
8981
|
className: "flex items-center justify-between",
|
|
8794
8982
|
children: [e && /* @__PURE__ */ _("label", {
|
|
8795
8983
|
htmlFor: p,
|
|
8796
|
-
className: "
|
|
8984
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
8797
8985
|
children: e
|
|
8798
8986
|
}), t && /* @__PURE__ */ _("p", {
|
|
8799
8987
|
id: m,
|
|
@@ -8821,10 +9009,10 @@ var So = a(({ label: e, error: t, options: n, className: r, id: i, hint: a, cont
|
|
|
8821
9009
|
]
|
|
8822
9010
|
});
|
|
8823
9011
|
});
|
|
8824
|
-
|
|
9012
|
+
Fo.displayName = "Select";
|
|
8825
9013
|
//#endregion
|
|
8826
9014
|
//#region src/components/ui/SettingRow.tsx
|
|
8827
|
-
function
|
|
9015
|
+
function Io({ label: e, description: t, action: n, className: r }) {
|
|
8828
9016
|
return /* @__PURE__ */ v("div", {
|
|
8829
9017
|
className: G("border-border flex items-center justify-between border-b py-3", r),
|
|
8830
9018
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -8844,9 +9032,9 @@ function Co({ label: e, description: t, action: n, className: r }) {
|
|
|
8844
9032
|
}
|
|
8845
9033
|
//#endregion
|
|
8846
9034
|
//#region src/components/ui/SideSheet.tsx
|
|
8847
|
-
function
|
|
8848
|
-
let u = m(null);
|
|
8849
|
-
return ft(
|
|
9035
|
+
function Lo({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "right", widthClassName: o = "w-[360px]", className: s, contentClassName: c }) {
|
|
9036
|
+
let u = an(), d = m(null);
|
|
9037
|
+
return ft(d, e), l(() => {
|
|
8850
9038
|
if (!e) return;
|
|
8851
9039
|
let n = (e) => {
|
|
8852
9040
|
e.key === "Escape" && t();
|
|
@@ -8860,7 +9048,7 @@ function wo({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
|
|
|
8860
9048
|
className: "bg-bg-overlay animate-fade-in absolute inset-0",
|
|
8861
9049
|
onClick: t
|
|
8862
9050
|
}), /* @__PURE__ */ v("div", {
|
|
8863
|
-
ref:
|
|
9051
|
+
ref: d,
|
|
8864
9052
|
className: G("bg-bg-secondary border-border absolute inset-y-0 flex flex-col shadow-lg", o, a === "right" ? "animate-slide-in-right right-0 border-l" : "animate-slide-in-left left-0 border-r", s),
|
|
8865
9053
|
style: { maxWidth: "calc(100vw - 2rem)" },
|
|
8866
9054
|
role: "dialog",
|
|
@@ -8868,23 +9056,28 @@ function wo({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
|
|
|
8868
9056
|
"aria-label": typeof n == "string" ? n : "Panel",
|
|
8869
9057
|
children: [
|
|
8870
9058
|
/* @__PURE__ */ v("div", {
|
|
8871
|
-
|
|
9059
|
+
"data-control-size": u,
|
|
9060
|
+
className: "ui-bar border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2.5",
|
|
8872
9061
|
children: [n && /* @__PURE__ */ _("h3", {
|
|
8873
|
-
className: "text-text-primary truncate text-
|
|
9062
|
+
className: "text-text-primary truncate text-sm font-medium",
|
|
8874
9063
|
children: n
|
|
8875
|
-
}), /* @__PURE__ */ _(
|
|
9064
|
+
}), /* @__PURE__ */ _(fn, {
|
|
9065
|
+
type: "button",
|
|
9066
|
+
variant: "icon",
|
|
9067
|
+
size: "sm",
|
|
8876
9068
|
onClick: t,
|
|
8877
|
-
className: "
|
|
9069
|
+
className: "ml-auto shrink-0",
|
|
8878
9070
|
"aria-label": "Close",
|
|
8879
|
-
children: /* @__PURE__ */ _(V, { className: "h-
|
|
9071
|
+
children: /* @__PURE__ */ _(V, { className: "h-4 w-4" })
|
|
8880
9072
|
})]
|
|
8881
9073
|
}),
|
|
8882
9074
|
/* @__PURE__ */ _("div", {
|
|
8883
|
-
className: G("flex-1 overflow-y-auto p-3", c),
|
|
9075
|
+
className: G("ui-surface-body flex-1 overflow-y-auto p-3", c),
|
|
8884
9076
|
children: r
|
|
8885
9077
|
}),
|
|
8886
9078
|
i && /* @__PURE__ */ _("div", {
|
|
8887
|
-
|
|
9079
|
+
"data-control-size": u,
|
|
9080
|
+
className: "ui-bar border-border bg-bg-primary/50 flex shrink-0 items-center gap-2 border-t px-3 py-2.5",
|
|
8888
9081
|
children: i
|
|
8889
9082
|
})
|
|
8890
9083
|
]
|
|
@@ -8893,41 +9086,41 @@ function wo({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
|
|
|
8893
9086
|
}
|
|
8894
9087
|
//#endregion
|
|
8895
9088
|
//#region src/components/ui/SplitPaneLayout.tsx
|
|
8896
|
-
function
|
|
9089
|
+
function Ro({ children: e, direction: t = "row", className: n }) {
|
|
8897
9090
|
return /* @__PURE__ */ _("div", {
|
|
8898
9091
|
className: G("-m-4 md:-m-6", "flex h-[calc(100vh-var(--topbar-height)-var(--bottomnav-height))] gap-0 md:h-[calc(100vh-var(--topbar-height))]", t === "column" && "flex-col", n),
|
|
8899
9092
|
children: e
|
|
8900
9093
|
});
|
|
8901
9094
|
}
|
|
8902
|
-
function
|
|
9095
|
+
function zo({ children: e, className: t }) {
|
|
8903
9096
|
return /* @__PURE__ */ _("div", {
|
|
8904
9097
|
className: G("flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", t),
|
|
8905
9098
|
children: e
|
|
8906
9099
|
});
|
|
8907
9100
|
}
|
|
8908
|
-
var
|
|
9101
|
+
var Bo = Object.assign(Ro, { Main: zo }), Vo = {
|
|
8909
9102
|
active: "bg-green",
|
|
8910
9103
|
inactive: "bg-text-tertiary",
|
|
8911
9104
|
pending: "bg-yellow animate-pulse-subtle",
|
|
8912
9105
|
error: "bg-red"
|
|
8913
|
-
},
|
|
9106
|
+
}, Ho = {
|
|
8914
9107
|
active: "text-green",
|
|
8915
9108
|
inactive: "text-text-tertiary",
|
|
8916
9109
|
pending: "text-yellow",
|
|
8917
9110
|
error: "text-red"
|
|
8918
9111
|
};
|
|
8919
|
-
function
|
|
9112
|
+
function Uo({ status: e, label: t, className: n }) {
|
|
8920
9113
|
return /* @__PURE__ */ v("span", {
|
|
8921
9114
|
className: G("inline-flex items-center gap-1.5", n),
|
|
8922
|
-
children: [/* @__PURE__ */ _("span", { className: G("h-2 w-2 rounded-full",
|
|
8923
|
-
className: G("text-xs",
|
|
9115
|
+
children: [/* @__PURE__ */ _("span", { className: G("h-2 w-2 rounded-full", Vo[e]) }), t && /* @__PURE__ */ _("span", {
|
|
9116
|
+
className: G("text-xs", Ho[e]),
|
|
8924
9117
|
children: t
|
|
8925
9118
|
})]
|
|
8926
9119
|
});
|
|
8927
9120
|
}
|
|
8928
9121
|
//#endregion
|
|
8929
9122
|
//#region src/components/ui/StepProgress.tsx
|
|
8930
|
-
function
|
|
9123
|
+
function Wo({ steps: e, currentStep: t, className: n }) {
|
|
8931
9124
|
return /* @__PURE__ */ _("div", {
|
|
8932
9125
|
className: G("flex items-center justify-between", n),
|
|
8933
9126
|
children: e.map((n, r) => /* @__PURE__ */ v("div", {
|
|
@@ -8954,7 +9147,7 @@ function jo({ steps: e, currentStep: t, className: n }) {
|
|
|
8954
9147
|
}
|
|
8955
9148
|
//#endregion
|
|
8956
9149
|
//#region src/components/ui/Tabs.tsx
|
|
8957
|
-
function
|
|
9150
|
+
function Go({ tabs: e, defaultTab: t, value: n, onChange: r, className: i }) {
|
|
8958
9151
|
let [a, o] = h(t || e[0]?.key), s = n ?? a, c = e.some((e) => e.key === s) ? s : e[0]?.key, l = e.find((e) => e.key === c);
|
|
8959
9152
|
function d(e) {
|
|
8960
9153
|
n === void 0 && o(e), r?.(e);
|
|
@@ -8993,8 +9186,8 @@ function Mo({ tabs: e, defaultTab: t, value: n, onChange: r, className: i }) {
|
|
|
8993
9186
|
}
|
|
8994
9187
|
//#endregion
|
|
8995
9188
|
//#region src/components/ui/Textarea.tsx
|
|
8996
|
-
var
|
|
8997
|
-
let m =
|
|
9189
|
+
var Ko = a(({ label: e, error: t, showCount: n, maxLength: r, value: i, className: a, id: o, hint: s, controlSize: c, required: l, "aria-describedby": u, "aria-invalid": d, ...f }, p) => {
|
|
9190
|
+
let m = no({
|
|
8998
9191
|
id: o,
|
|
8999
9192
|
error: t,
|
|
9000
9193
|
hint: s,
|
|
@@ -9012,7 +9205,7 @@ var No = a(({ label: e, error: t, showCount: n, maxLength: r, value: i, classNam
|
|
|
9012
9205
|
}),
|
|
9013
9206
|
e && /* @__PURE__ */ _("label", {
|
|
9014
9207
|
htmlFor: h,
|
|
9015
|
-
className: "
|
|
9208
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
9016
9209
|
children: e
|
|
9017
9210
|
}),
|
|
9018
9211
|
/* @__PURE__ */ _("textarea", {
|
|
@@ -9045,11 +9238,11 @@ var No = a(({ label: e, error: t, showCount: n, maxLength: r, value: i, classNam
|
|
|
9045
9238
|
]
|
|
9046
9239
|
});
|
|
9047
9240
|
});
|
|
9048
|
-
|
|
9241
|
+
Ko.displayName = "Textarea";
|
|
9049
9242
|
//#endregion
|
|
9050
9243
|
//#region src/components/ui/TextInput.tsx
|
|
9051
|
-
var
|
|
9052
|
-
let p =
|
|
9244
|
+
var qo = a(({ label: e, error: t, icon: n, className: r, id: i, readOnly: a, hint: o, controlSize: s, required: c, "aria-describedby": l, "aria-invalid": u, ...d }, f) => {
|
|
9245
|
+
let p = no({
|
|
9053
9246
|
id: i,
|
|
9054
9247
|
error: t,
|
|
9055
9248
|
hint: o,
|
|
@@ -9069,7 +9262,7 @@ var Po = a(({ label: e, error: t, icon: n, className: r, id: i, readOnly: a, hin
|
|
|
9069
9262
|
className: "flex items-center justify-between",
|
|
9070
9263
|
children: [e && /* @__PURE__ */ _("label", {
|
|
9071
9264
|
htmlFor: m,
|
|
9072
|
-
className: "
|
|
9265
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
9073
9266
|
children: e
|
|
9074
9267
|
}), t && /* @__PURE__ */ _("p", {
|
|
9075
9268
|
id: h,
|
|
@@ -9098,10 +9291,10 @@ var Po = a(({ label: e, error: t, icon: n, className: r, id: i, readOnly: a, hin
|
|
|
9098
9291
|
]
|
|
9099
9292
|
});
|
|
9100
9293
|
});
|
|
9101
|
-
|
|
9294
|
+
qo.displayName = "TextInput";
|
|
9102
9295
|
//#endregion
|
|
9103
9296
|
//#region src/components/ui/Timeline.tsx
|
|
9104
|
-
function
|
|
9297
|
+
function Jo({ items: e, className: t }) {
|
|
9105
9298
|
return /* @__PURE__ */ _("div", {
|
|
9106
9299
|
className: G("space-y-0", t),
|
|
9107
9300
|
children: e.map((t, n) => /* @__PURE__ */ v("div", {
|
|
@@ -9124,16 +9317,16 @@ function Fo({ items: e, className: t }) {
|
|
|
9124
9317
|
}
|
|
9125
9318
|
//#endregion
|
|
9126
9319
|
//#region src/components/ui/Tooltip.tsx
|
|
9127
|
-
var
|
|
9320
|
+
var Yo = {
|
|
9128
9321
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
9129
9322
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
9130
9323
|
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
9131
9324
|
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
9132
9325
|
};
|
|
9133
|
-
function
|
|
9326
|
+
function Xo(e, t) {
|
|
9134
9327
|
return e ? `${e} ${t}` : t;
|
|
9135
9328
|
}
|
|
9136
|
-
function
|
|
9329
|
+
function Zo({ content: e, placement: t = "top", children: r }) {
|
|
9137
9330
|
let [i, a] = h(!1), s = u();
|
|
9138
9331
|
return /* @__PURE__ */ v("div", {
|
|
9139
9332
|
className: "relative inline-flex",
|
|
@@ -9141,9 +9334,9 @@ function Ro({ content: e, placement: t = "top", children: r }) {
|
|
|
9141
9334
|
onMouseLeave: () => a(!1),
|
|
9142
9335
|
onFocus: () => a(!0),
|
|
9143
9336
|
onBlur: () => a(!1),
|
|
9144
|
-
children: [o(r) ? n(r, { "aria-describedby":
|
|
9337
|
+
children: [o(r) ? n(r, { "aria-describedby": Xo(r.props["aria-describedby"], s) }) : r, i && /* @__PURE__ */ _("div", {
|
|
9145
9338
|
id: s,
|
|
9146
|
-
className: G("text-2xs absolute z-50 px-2 py-1 font-medium whitespace-nowrap", "bg-bg-tertiary text-text-primary border-border rounded border shadow-md", "animate-fade-in pointer-events-none",
|
|
9339
|
+
className: G("text-2xs absolute z-50 px-2 py-1 font-medium whitespace-nowrap", "bg-bg-tertiary text-text-primary border-border rounded border shadow-md", "animate-fade-in pointer-events-none", Yo[t]),
|
|
9147
9340
|
role: "tooltip",
|
|
9148
9341
|
children: e
|
|
9149
9342
|
})]
|
|
@@ -9151,7 +9344,7 @@ function Ro({ content: e, placement: t = "top", children: r }) {
|
|
|
9151
9344
|
}
|
|
9152
9345
|
//#endregion
|
|
9153
9346
|
//#region src/components/ui/Toolbar.tsx
|
|
9154
|
-
function
|
|
9347
|
+
function Qo({ start: e, end: t, children: n, className: r, startClassName: i, endClassName: a }) {
|
|
9155
9348
|
return /* @__PURE__ */ v("div", {
|
|
9156
9349
|
className: G("flex items-center justify-between gap-3", r),
|
|
9157
9350
|
children: [/* @__PURE__ */ _("div", {
|
|
@@ -9165,7 +9358,7 @@ function zo({ start: e, end: t, children: n, className: r, startClassName: i, en
|
|
|
9165
9358
|
}
|
|
9166
9359
|
//#endregion
|
|
9167
9360
|
//#region src/components/ui/UploadDropzone.tsx
|
|
9168
|
-
var
|
|
9361
|
+
var $o = a(function({ title: e = "Drag and drop files here, or click to browse", description: t, icon: n, multiple: r, disabled: i, onChange: a, onFilesChange: o, className: s, id: c, "aria-describedby": l, ...f }, p) {
|
|
9169
9362
|
let h = m(null);
|
|
9170
9363
|
d(p, () => h.current, []);
|
|
9171
9364
|
let g = u(), y = `${c ?? g}-description`;
|
|
@@ -9212,15 +9405,15 @@ var Bo = a(function({ title: e = "Drag and drop files here, or click to browse",
|
|
|
9212
9405
|
})
|
|
9213
9406
|
]
|
|
9214
9407
|
});
|
|
9215
|
-
}),
|
|
9408
|
+
}), es = r({ theme: "dark" });
|
|
9216
9409
|
//#endregion
|
|
9217
9410
|
//#region src/hooks/useTheme.ts
|
|
9218
|
-
function
|
|
9219
|
-
return c(
|
|
9411
|
+
function ts() {
|
|
9412
|
+
return c(es);
|
|
9220
9413
|
}
|
|
9221
9414
|
//#endregion
|
|
9222
9415
|
//#region src/lib/formatDate.ts
|
|
9223
|
-
var
|
|
9416
|
+
var ns = [
|
|
9224
9417
|
"Jan",
|
|
9225
9418
|
"Feb",
|
|
9226
9419
|
"Mar",
|
|
@@ -9234,21 +9427,21 @@ var Uo = [
|
|
|
9234
9427
|
"Nov",
|
|
9235
9428
|
"Dec"
|
|
9236
9429
|
];
|
|
9237
|
-
function
|
|
9430
|
+
function rs(e) {
|
|
9238
9431
|
return (/* @__PURE__ */ new Date(e + "T00:00:00")).toLocaleDateString("en-US", {
|
|
9239
9432
|
month: "short",
|
|
9240
9433
|
day: "numeric",
|
|
9241
9434
|
year: "numeric"
|
|
9242
9435
|
});
|
|
9243
9436
|
}
|
|
9244
|
-
function
|
|
9437
|
+
function is(e) {
|
|
9245
9438
|
return (/* @__PURE__ */ new Date(e + "T00:00:00")).toLocaleDateString("en-US", {
|
|
9246
9439
|
month: "long",
|
|
9247
9440
|
day: "numeric",
|
|
9248
9441
|
year: "numeric"
|
|
9249
9442
|
});
|
|
9250
9443
|
}
|
|
9251
|
-
function
|
|
9444
|
+
function as(e, t = /* @__PURE__ */ new Date()) {
|
|
9252
9445
|
let n = t.getTime() - e.getTime(), r = Math.floor(n / 1e3);
|
|
9253
9446
|
if (r < 60) return "just now";
|
|
9254
9447
|
let i = Math.floor(r / 60);
|
|
@@ -9256,18 +9449,18 @@ function Ko(e, t = /* @__PURE__ */ new Date()) {
|
|
|
9256
9449
|
let a = Math.floor(i / 60);
|
|
9257
9450
|
if (a < 24) return `${a}h ago`;
|
|
9258
9451
|
if (Math.floor(a / 24) === 1) return "yesterday";
|
|
9259
|
-
let o = `${
|
|
9452
|
+
let o = `${ns[e.getMonth()]} ${e.getDate()}`;
|
|
9260
9453
|
return e.getFullYear() === t.getFullYear() ? o : `${o}, ${e.getFullYear()}`;
|
|
9261
9454
|
}
|
|
9262
9455
|
//#endregion
|
|
9263
9456
|
//#region src/providers/SettingsProvider.tsx
|
|
9264
|
-
var
|
|
9457
|
+
var os = {
|
|
9265
9458
|
"archivo-expanded": "\"Archivo\", \"Arial Black\", \"Avenir Next Condensed\", \"HelveticaNeue-CondensedBold\", system-ui, sans-serif",
|
|
9266
9459
|
inter: "\"Inter\", system-ui, -apple-system, BlinkMacSystemFont, sans-serif",
|
|
9267
9460
|
"jetbrains-mono": "\"JetBrains Mono\", Menlo, Monaco, Consolas, monospace",
|
|
9268
9461
|
"pt-serif": "\"PT Serif\", Georgia, ui-serif, Cambria, \"Times New Roman\", Times, serif",
|
|
9269
9462
|
system: "system-ui, -apple-system, BlinkMacSystemFont, sans-serif"
|
|
9270
|
-
},
|
|
9463
|
+
}, ss = {
|
|
9271
9464
|
purple: {
|
|
9272
9465
|
base: "#7C5CFC",
|
|
9273
9466
|
hover: "#6B4AEB",
|
|
@@ -9324,43 +9517,43 @@ var qo = {
|
|
|
9324
9517
|
muted: "rgba(99,102,241,0.15)",
|
|
9325
9518
|
subtle: "rgba(99,102,241,0.08)"
|
|
9326
9519
|
}
|
|
9327
|
-
},
|
|
9520
|
+
}, cs = "leonardaustin-ui-settings", ls = new Set(Object.keys(ss)), us = new Set(Object.keys(Ot)), ds = new Set(Object.keys(os)), fs = new Set([
|
|
9328
9521
|
"light",
|
|
9329
9522
|
"dark",
|
|
9330
9523
|
"system"
|
|
9331
9524
|
]);
|
|
9332
|
-
function
|
|
9525
|
+
function ps(e, t, n, r) {
|
|
9333
9526
|
return typeof e != "number" || !isFinite(e) ? r : Math.min(n, Math.max(t, e));
|
|
9334
9527
|
}
|
|
9335
|
-
function
|
|
9528
|
+
function ms(e) {
|
|
9336
9529
|
let t = {};
|
|
9337
|
-
if (
|
|
9530
|
+
if (ls.has(e.accentColor) && (t.accentColor = e.accentColor), fs.has(e.colorMode) && (t.colorMode = e.colorMode), us.has(e.preferredDarkTheme) && !Ct(e.preferredDarkTheme) && (t.preferredDarkTheme = e.preferredDarkTheme), us.has(e.preferredLightTheme) && Ct(e.preferredLightTheme) && (t.preferredLightTheme = e.preferredLightTheme), typeof e.sidebarCollapsed == "boolean" && (t.sidebarCollapsed = e.sidebarCollapsed), typeof e.reducedMotion == "boolean" && (t.reducedMotion = e.reducedMotion), typeof e.sidebarWidth == "number" && (t.sidebarWidth = ps(e.sidebarWidth, 160, 400, 220)), e.themeOverrides && typeof e.themeOverrides == "object") {
|
|
9338
9531
|
let n = {};
|
|
9339
9532
|
for (let [t, r] of Object.entries(e.themeOverrides)) {
|
|
9340
|
-
if (!
|
|
9533
|
+
if (!us.has(t) || !r || typeof r != "object") continue;
|
|
9341
9534
|
let e = r, i = Ot[t];
|
|
9342
9535
|
n[t] = {
|
|
9343
|
-
uiFont:
|
|
9344
|
-
headingFont:
|
|
9345
|
-
proseFont:
|
|
9346
|
-
controlFont:
|
|
9347
|
-
labelFont:
|
|
9348
|
-
navigationFont:
|
|
9349
|
-
dataFont:
|
|
9350
|
-
codeFont:
|
|
9351
|
-
fontSize:
|
|
9352
|
-
borderRadius:
|
|
9353
|
-
borderWidth:
|
|
9354
|
-
tracking:
|
|
9355
|
-
lineHeight:
|
|
9356
|
-
density:
|
|
9536
|
+
uiFont: ds.has(e.uiFont) ? e.uiFont : i.uiFont,
|
|
9537
|
+
headingFont: ds.has(e.headingFont) ? e.headingFont : i.headingFont,
|
|
9538
|
+
proseFont: ds.has(e.proseFont) ? e.proseFont : i.proseFont,
|
|
9539
|
+
controlFont: ds.has(e.controlFont) ? e.controlFont : i.controlFont,
|
|
9540
|
+
labelFont: ds.has(e.labelFont) ? e.labelFont : i.labelFont,
|
|
9541
|
+
navigationFont: ds.has(e.navigationFont) ? e.navigationFont : i.navigationFont,
|
|
9542
|
+
dataFont: ds.has(e.dataFont) ? e.dataFont : i.dataFont,
|
|
9543
|
+
codeFont: ds.has(e.codeFont) ? e.codeFont : i.codeFont,
|
|
9544
|
+
fontSize: ps(e.fontSize, 11, 18, i.fontSize),
|
|
9545
|
+
borderRadius: ps(e.borderRadius, 0, 16, i.borderRadius),
|
|
9546
|
+
borderWidth: ps(e.borderWidth, 1, 3, i.borderWidth),
|
|
9547
|
+
tracking: ps(e.tracking, 0, .3, i.tracking),
|
|
9548
|
+
lineHeight: ps(e.lineHeight, 1.2, 2, i.lineHeight),
|
|
9549
|
+
density: ps(e.density, .18, .32, i.density)
|
|
9357
9550
|
};
|
|
9358
9551
|
}
|
|
9359
9552
|
t.themeOverrides = n;
|
|
9360
9553
|
}
|
|
9361
9554
|
return t;
|
|
9362
9555
|
}
|
|
9363
|
-
var
|
|
9556
|
+
var hs = {
|
|
9364
9557
|
accentColor: "purple",
|
|
9365
9558
|
sidebarCollapsed: !1,
|
|
9366
9559
|
sidebarWidth: 220,
|
|
@@ -9370,35 +9563,35 @@ var ns = {
|
|
|
9370
9563
|
preferredLightTheme: "light",
|
|
9371
9564
|
themeOverrides: {}
|
|
9372
9565
|
};
|
|
9373
|
-
function
|
|
9566
|
+
function gs(e, t) {
|
|
9374
9567
|
let n = {
|
|
9375
|
-
...
|
|
9376
|
-
...
|
|
9568
|
+
...hs,
|
|
9569
|
+
...ms(t ?? {})
|
|
9377
9570
|
};
|
|
9378
9571
|
if (typeof localStorage > "u") return n;
|
|
9379
9572
|
try {
|
|
9380
9573
|
let t = localStorage.getItem(e);
|
|
9381
9574
|
if (t) return {
|
|
9382
9575
|
...n,
|
|
9383
|
-
...
|
|
9576
|
+
...ms(JSON.parse(t))
|
|
9384
9577
|
};
|
|
9385
9578
|
} catch (e) {
|
|
9386
9579
|
console.warn("[SettingsProvider] Failed to load settings:", e);
|
|
9387
9580
|
}
|
|
9388
9581
|
return n;
|
|
9389
9582
|
}
|
|
9390
|
-
function
|
|
9583
|
+
function _s(e, t) {
|
|
9391
9584
|
let n = Ot[e] ?? Ot.dark;
|
|
9392
9585
|
return t[e] ? {
|
|
9393
9586
|
...n,
|
|
9394
9587
|
...t[e]
|
|
9395
9588
|
} : n;
|
|
9396
9589
|
}
|
|
9397
|
-
function
|
|
9590
|
+
function vs(e, t) {
|
|
9398
9591
|
return e.uiFont === t.uiFont && e.headingFont === t.headingFont && e.proseFont === t.proseFont && e.controlFont === t.controlFont && e.labelFont === t.labelFont && e.navigationFont === t.navigationFont && e.dataFont === t.dataFont && e.codeFont === t.codeFont && e.fontSize === t.fontSize && e.borderRadius === t.borderRadius && e.borderWidth === t.borderWidth && e.tracking === t.tracking && e.lineHeight === t.lineHeight && e.density === t.density;
|
|
9399
9592
|
}
|
|
9400
|
-
function
|
|
9401
|
-
let [i, a] = h(() =>
|
|
9593
|
+
function ys({ children: e, storageKey: t = cs, initialSettings: n, forcedTheme: r }) {
|
|
9594
|
+
let [i, a] = h(() => gs(t, n)), [o, c] = h(() => typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
9402
9595
|
l(() => {
|
|
9403
9596
|
if (typeof window > "u") return;
|
|
9404
9597
|
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e) => c(e.matches);
|
|
@@ -9410,9 +9603,9 @@ function os({ children: e, storageKey: t = Yo, initialSettings: n, forcedTheme:
|
|
|
9410
9603
|
i.preferredDarkTheme,
|
|
9411
9604
|
i.preferredLightTheme,
|
|
9412
9605
|
o
|
|
9413
|
-
]), [d, f] = h(() =>
|
|
9606
|
+
]), [d, f] = h(() => _s(u, i.themeOverrides));
|
|
9414
9607
|
l(() => {
|
|
9415
|
-
f(
|
|
9608
|
+
f(_s(u, i.themeOverrides));
|
|
9416
9609
|
}, [u]);
|
|
9417
9610
|
let m = s((e) => {
|
|
9418
9611
|
a((n) => {
|
|
@@ -9429,15 +9622,15 @@ function os({ children: e, storageKey: t = Yo, initialSettings: n, forcedTheme:
|
|
|
9429
9622
|
});
|
|
9430
9623
|
}, [t]);
|
|
9431
9624
|
l(() => {
|
|
9432
|
-
let e = document.documentElement, t =
|
|
9625
|
+
let e = document.documentElement, t = ss[i.accentColor];
|
|
9433
9626
|
e.style.setProperty("--accent", t.base), e.style.setProperty("--accent-hover", t.hover), e.style.setProperty("--accent-active", t.active), e.style.setProperty("--accent-muted", t.muted), e.style.setProperty("--accent-subtle", t.subtle);
|
|
9434
9627
|
}, [i.accentColor]), l(() => {
|
|
9435
9628
|
document.documentElement.classList.toggle("reduced-motion", i.reducedMotion);
|
|
9436
9629
|
}, [i.reducedMotion]), l(() => {
|
|
9437
9630
|
let e = document.documentElement, t = d.borderRadius;
|
|
9438
|
-
e.style.fontSize = `${d.fontSize / 13 * 100}%`, e.style.setProperty("--font-ui",
|
|
9631
|
+
e.style.fontSize = `${d.fontSize / 13 * 100}%`, e.style.setProperty("--font-ui", os[d.uiFont]), e.style.setProperty("--font-heading", os[d.headingFont]), e.style.setProperty("--font-prose", os[d.proseFont]), e.style.setProperty("--font-control", os[d.controlFont]), e.style.setProperty("--font-label", os[d.labelFont]), e.style.setProperty("--font-navigation", os[d.navigationFont]), e.style.setProperty("--font-data", os[d.dataFont]), e.style.setProperty("--font-code", os[d.codeFont]), e.style.setProperty("--ui-radius", t === 0 ? "0" : `${Math.round(t * 2 / 3)}px`), e.style.setProperty("--ui-radius-md", t === 0 ? "0" : `${t}px`), e.style.setProperty("--ui-radius-lg", t === 0 ? "0" : `${Math.round(t * 4 / 3)}px`), e.style.setProperty("--ui-radius-xl", t === 0 ? "0" : `${t * 2}px`), e.style.setProperty("--ui-border-width", `${d.borderWidth}px`), e.style.setProperty("--ui-tracking", `${d.tracking}em`), e.style.setProperty("--ui-line-height", String(d.lineHeight)), e.style.setProperty("--ui-density", `${d.density}rem`);
|
|
9439
9632
|
}, [d]);
|
|
9440
|
-
let g = p(() =>
|
|
9633
|
+
let g = p(() => _s(u, i.themeOverrides), [u, i.themeOverrides]), v = u in i.themeOverrides, y = !vs(d, g), b = s(() => {
|
|
9441
9634
|
m({ themeOverrides: {
|
|
9442
9635
|
...i.themeOverrides,
|
|
9443
9636
|
[u]: { ...d }
|
|
@@ -9561,7 +9754,7 @@ function os({ children: e, storageKey: t = Yo, initialSettings: n, forcedTheme:
|
|
|
9561
9754
|
}
|
|
9562
9755
|
//#endregion
|
|
9563
9756
|
//#region src/providers/ThemeProvider.tsx
|
|
9564
|
-
var
|
|
9757
|
+
var bs = {
|
|
9565
9758
|
dark: "",
|
|
9566
9759
|
light: "theme-light",
|
|
9567
9760
|
lightInverted: "theme-light-inverted",
|
|
@@ -9571,33 +9764,33 @@ var ss = {
|
|
|
9571
9764
|
cyberBrutalLight: "theme-cyber-brutal-light",
|
|
9572
9765
|
hashiTheme: "theme-hashi"
|
|
9573
9766
|
};
|
|
9574
|
-
function
|
|
9767
|
+
function xs({ children: e }) {
|
|
9575
9768
|
let { resolvedTheme: t } = c(Mt);
|
|
9576
9769
|
return l(() => {
|
|
9577
9770
|
let e = document.documentElement;
|
|
9578
|
-
Object.values(
|
|
9771
|
+
Object.values(bs).forEach((t) => {
|
|
9579
9772
|
t && e.classList.remove(t);
|
|
9580
9773
|
});
|
|
9581
|
-
let n =
|
|
9774
|
+
let n = bs[t];
|
|
9582
9775
|
n && e.classList.add(n);
|
|
9583
|
-
}, [t]), /* @__PURE__ */ _(
|
|
9776
|
+
}, [t]), /* @__PURE__ */ _(es.Provider, {
|
|
9584
9777
|
value: { theme: t },
|
|
9585
9778
|
children: e
|
|
9586
9779
|
});
|
|
9587
9780
|
}
|
|
9588
9781
|
//#endregion
|
|
9589
9782
|
//#region src/components/ui/FormField.tsx
|
|
9590
|
-
function
|
|
9783
|
+
function Ss({ id: e, label: t, hint: n, error: r, required: i, optionalLabel: a, children: o, className: s, ...c }) {
|
|
9591
9784
|
let l = u(), d = e ?? l, f = n ? `${d}-hint` : void 0, p = r ? `${d}-error` : void 0, m = {
|
|
9592
9785
|
id: d,
|
|
9593
|
-
"aria-describedby":
|
|
9786
|
+
"aria-describedby": Rn(f, p),
|
|
9594
9787
|
"aria-invalid": !!r || void 0,
|
|
9595
9788
|
required: i
|
|
9596
9789
|
};
|
|
9597
|
-
return /* @__PURE__ */ _(
|
|
9790
|
+
return /* @__PURE__ */ _(Ln.Provider, {
|
|
9598
9791
|
value: {
|
|
9599
9792
|
id: d,
|
|
9600
|
-
describedBy:
|
|
9793
|
+
describedBy: Rn(f, p),
|
|
9601
9794
|
invalid: !!r,
|
|
9602
9795
|
required: i
|
|
9603
9796
|
},
|
|
@@ -9607,7 +9800,7 @@ function ls({ id: e, label: t, hint: n, error: r, required: i, optionalLabel: a,
|
|
|
9607
9800
|
children: [
|
|
9608
9801
|
/* @__PURE__ */ v("label", {
|
|
9609
9802
|
htmlFor: d,
|
|
9610
|
-
className: "
|
|
9803
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
9611
9804
|
children: [
|
|
9612
9805
|
t,
|
|
9613
9806
|
i && /* @__PURE__ */ _("span", {
|
|
@@ -9632,13 +9825,13 @@ function ls({ id: e, label: t, hint: n, error: r, required: i, optionalLabel: a,
|
|
|
9632
9825
|
})
|
|
9633
9826
|
});
|
|
9634
9827
|
}
|
|
9635
|
-
function
|
|
9828
|
+
function Cs({ className: e, ...t }) {
|
|
9636
9829
|
return /* @__PURE__ */ _("p", {
|
|
9637
9830
|
...t,
|
|
9638
9831
|
className: G("text-text-secondary text-xs", e)
|
|
9639
9832
|
});
|
|
9640
9833
|
}
|
|
9641
|
-
function
|
|
9834
|
+
function ws({ className: e, ...t }) {
|
|
9642
9835
|
return /* @__PURE__ */ _("p", {
|
|
9643
9836
|
...t,
|
|
9644
9837
|
className: G("text-red text-xs", e)
|
|
@@ -9646,8 +9839,8 @@ function ds({ className: e, ...t }) {
|
|
|
9646
9839
|
}
|
|
9647
9840
|
//#endregion
|
|
9648
9841
|
//#region src/components/ui/Fieldset.tsx
|
|
9649
|
-
function
|
|
9650
|
-
let c = u(), l = e ?? c, d = n ? `${l}-hint` : void 0, f = r ? `${l}-error` : void 0, p =
|
|
9842
|
+
function Ts({ id: e, legend: t, hint: n, error: r, children: i, className: a, "aria-describedby": o, ...s }) {
|
|
9843
|
+
let c = u(), l = e ?? c, d = n ? `${l}-hint` : void 0, f = r ? `${l}-error` : void 0, p = Rn(o, d, f);
|
|
9651
9844
|
return /* @__PURE__ */ v("fieldset", {
|
|
9652
9845
|
...s,
|
|
9653
9846
|
id: l,
|
|
@@ -9668,7 +9861,7 @@ function fs({ id: e, legend: t, hint: n, error: r, children: i, className: a, "a
|
|
|
9668
9861
|
className: "text-red text-xs",
|
|
9669
9862
|
children: r
|
|
9670
9863
|
}),
|
|
9671
|
-
/* @__PURE__ */ _(
|
|
9864
|
+
/* @__PURE__ */ _(Ln.Provider, {
|
|
9672
9865
|
value: {
|
|
9673
9866
|
describedBy: p,
|
|
9674
9867
|
invalid: !!r
|
|
@@ -9680,8 +9873,8 @@ function fs({ id: e, legend: t, hint: n, error: r, children: i, className: a, "a
|
|
|
9680
9873
|
}
|
|
9681
9874
|
//#endregion
|
|
9682
9875
|
//#region src/components/ui/Radio.tsx
|
|
9683
|
-
var
|
|
9684
|
-
let d = u(), f = an(n), p = c(
|
|
9876
|
+
var Es = a(({ label: e, description: t, controlSize: n, className: r, id: i, "aria-describedby": a, "aria-invalid": o, ...s }, l) => {
|
|
9877
|
+
let d = u(), f = an(n), p = c(Ln), m = i ?? p?.id ?? d, h = t ? `${m}-description` : void 0;
|
|
9685
9878
|
return /* @__PURE__ */ v("label", {
|
|
9686
9879
|
className: G("ui-choice flex items-start gap-2.5", r),
|
|
9687
9880
|
"data-control-size": f,
|
|
@@ -9691,7 +9884,7 @@ var ps = a(({ label: e, description: t, controlSize: n, className: r, id: i, "ar
|
|
|
9691
9884
|
id: m,
|
|
9692
9885
|
type: "radio",
|
|
9693
9886
|
"aria-invalid": o ?? (p?.invalid || void 0),
|
|
9694
|
-
"aria-describedby":
|
|
9887
|
+
"aria-describedby": Rn(a, p?.describedBy, h),
|
|
9695
9888
|
className: "ui-native-choice"
|
|
9696
9889
|
}), /* @__PURE__ */ v("span", {
|
|
9697
9890
|
className: "text-text-primary text-xs",
|
|
@@ -9703,14 +9896,14 @@ var ps = a(({ label: e, description: t, controlSize: n, className: r, id: i, "ar
|
|
|
9703
9896
|
})]
|
|
9704
9897
|
});
|
|
9705
9898
|
});
|
|
9706
|
-
|
|
9707
|
-
function
|
|
9899
|
+
Es.displayName = "Radio";
|
|
9900
|
+
function Ds({ name: e, id: t, options: n, value: r, onChange: i, required: a, disabled: o, controlSize: s, ...c }) {
|
|
9708
9901
|
let l = u(), d = t ?? l;
|
|
9709
|
-
return /* @__PURE__ */ _(
|
|
9902
|
+
return /* @__PURE__ */ _(Ts, {
|
|
9710
9903
|
...c,
|
|
9711
9904
|
id: d,
|
|
9712
9905
|
disabled: o,
|
|
9713
|
-
children: n.map((t, n) => /* @__PURE__ */ _(
|
|
9906
|
+
children: n.map((t, n) => /* @__PURE__ */ _(Es, {
|
|
9714
9907
|
id: `${d}-${n}`,
|
|
9715
9908
|
name: e ?? d,
|
|
9716
9909
|
value: t.value,
|
|
@@ -9724,17 +9917,17 @@ function ms({ name: e, id: t, options: n, value: r, onChange: i, required: a, di
|
|
|
9724
9917
|
}, t.value))
|
|
9725
9918
|
});
|
|
9726
9919
|
}
|
|
9727
|
-
var
|
|
9920
|
+
var Os = Object.assign(Es, { Group: Ds }), ks = {
|
|
9728
9921
|
pending: "Pending",
|
|
9729
9922
|
uploading: "Uploading",
|
|
9730
9923
|
processing: "Processing",
|
|
9731
9924
|
ready: "Ready",
|
|
9732
9925
|
error: "Upload failed"
|
|
9733
9926
|
};
|
|
9734
|
-
function
|
|
9927
|
+
function As(e) {
|
|
9735
9928
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
9736
9929
|
}
|
|
9737
|
-
function
|
|
9930
|
+
function js({ name: e, size: t, status: n = "ready", statusLabel: r, error: i, onRetry: a, onRemove: o, onDownload: s, downloadHref: c, actionsDisabled: l, className: u, ...d }) {
|
|
9738
9931
|
return /* @__PURE__ */ v("li", {
|
|
9739
9932
|
...d,
|
|
9740
9933
|
className: G("ui-attachment-item border-border flex items-center justify-between gap-3 rounded-md border p-3", u),
|
|
@@ -9747,7 +9940,7 @@ function vs({ name: e, size: t, status: n = "ready", statusLabel: r, error: i, o
|
|
|
9747
9940
|
}),
|
|
9748
9941
|
t !== void 0 && /* @__PURE__ */ _("p", {
|
|
9749
9942
|
className: "text-text-tertiary text-2xs",
|
|
9750
|
-
children:
|
|
9943
|
+
children: As(t)
|
|
9751
9944
|
}),
|
|
9752
9945
|
/* @__PURE__ */ v("div", {
|
|
9753
9946
|
role: "status",
|
|
@@ -9756,7 +9949,7 @@ function vs({ name: e, size: t, status: n = "ready", statusLabel: r, error: i, o
|
|
|
9756
9949
|
children: [
|
|
9757
9950
|
e,
|
|
9758
9951
|
": ",
|
|
9759
|
-
i ?? r ??
|
|
9952
|
+
i ?? r ?? ks[n]
|
|
9760
9953
|
]
|
|
9761
9954
|
})
|
|
9762
9955
|
]
|
|
@@ -9798,7 +9991,7 @@ function vs({ name: e, size: t, status: n = "ready", statusLabel: r, error: i, o
|
|
|
9798
9991
|
})]
|
|
9799
9992
|
});
|
|
9800
9993
|
}
|
|
9801
|
-
function
|
|
9994
|
+
function Ms({ children: e, className: t, "aria-label": n = "Attachments", ...r }) {
|
|
9802
9995
|
return /* @__PURE__ */ _("ul", {
|
|
9803
9996
|
...r,
|
|
9804
9997
|
"aria-label": n,
|
|
@@ -9808,7 +10001,7 @@ function ys({ children: e, className: t, "aria-label": n = "Attachments", ...r }
|
|
|
9808
10001
|
}
|
|
9809
10002
|
//#endregion
|
|
9810
10003
|
//#region src/lib/dateParts.ts
|
|
9811
|
-
function
|
|
10004
|
+
function Ns(e, { required: t = !1, minYear: n = 1900, maxYear: r = 2100 } = {}) {
|
|
9812
10005
|
let i = [
|
|
9813
10006
|
e.day,
|
|
9814
10007
|
e.month,
|
|
@@ -9838,10 +10031,10 @@ function bs(e, { required: t = !1, minYear: n = 1900, maxYear: r = 2100 } = {})
|
|
|
9838
10031
|
}
|
|
9839
10032
|
//#endregion
|
|
9840
10033
|
//#region src/components/ui/DatePartsInput.tsx
|
|
9841
|
-
function
|
|
10034
|
+
function Ps({ value: e, onChange: t, label: n, hint: r, error: i, id: a, name: o, disabled: s, required: c, className: d, inputProps: f, minYear: p = 1900, maxYear: g = 2100 }) {
|
|
9842
10035
|
let y = u(), b = m({}), [x, S] = h(!1);
|
|
9843
10036
|
if (!Number.isInteger(p) || !Number.isInteger(g) || p < 1 || g > 9999 || p > g) throw RangeError("DatePartsInput requires year bounds between 1 and 9999, with minYear <= maxYear");
|
|
9844
|
-
let C =
|
|
10037
|
+
let C = Ns(e, {
|
|
9845
10038
|
required: c,
|
|
9846
10039
|
minYear: p,
|
|
9847
10040
|
maxYear: g
|
|
@@ -9874,7 +10067,7 @@ function xs({ value: e, onChange: t, label: n, hint: r, error: i, id: a, name: o
|
|
|
9874
10067
|
"aria-describedby": A,
|
|
9875
10068
|
children: [
|
|
9876
10069
|
/* @__PURE__ */ v("legend", {
|
|
9877
|
-
className: "
|
|
10070
|
+
className: "ui-field-label text-xs font-medium",
|
|
9878
10071
|
children: [n, c && /* @__PURE__ */ _("span", { children: " (required)" })]
|
|
9879
10072
|
}),
|
|
9880
10073
|
r && /* @__PURE__ */ _("p", {
|
|
@@ -9890,7 +10083,7 @@ function xs({ value: e, onChange: t, label: n, hint: r, error: i, id: a, name: o
|
|
|
9890
10083
|
"year"
|
|
9891
10084
|
].map((n) => /* @__PURE__ */ v("div", {
|
|
9892
10085
|
className: "ui-date-part",
|
|
9893
|
-
children: [/* @__PURE__ */ _(
|
|
10086
|
+
children: [/* @__PURE__ */ _(qo, {
|
|
9894
10087
|
inputMode: "numeric",
|
|
9895
10088
|
"data-1p-ignore": "true",
|
|
9896
10089
|
...f?.[n],
|
|
@@ -9957,7 +10150,7 @@ function xs({ value: e, onChange: t, label: n, hint: r, error: i, id: a, name: o
|
|
|
9957
10150
|
}
|
|
9958
10151
|
//#endregion
|
|
9959
10152
|
//#region src/components/ui/Skeleton.tsx
|
|
9960
|
-
function
|
|
10153
|
+
function Fs({ className: e, width: t, height: n, style: r, ...i }) {
|
|
9961
10154
|
return /* @__PURE__ */ _("div", {
|
|
9962
10155
|
...i,
|
|
9963
10156
|
"aria-hidden": "true",
|
|
@@ -9971,7 +10164,7 @@ function Ss({ className: e, width: t, height: n, style: r, ...i }) {
|
|
|
9971
10164
|
}
|
|
9972
10165
|
//#endregion
|
|
9973
10166
|
//#region src/components/ui/NavTabs.tsx
|
|
9974
|
-
function
|
|
10167
|
+
function Is({ items: e, activeKey: t, renderLink: n, className: r, "aria-label": i = "Sections", ...a }) {
|
|
9975
10168
|
return /* @__PURE__ */ _("nav", {
|
|
9976
10169
|
...a,
|
|
9977
10170
|
"aria-label": i,
|
|
@@ -9995,7 +10188,7 @@ function Cs({ items: e, activeKey: t, renderLink: n, className: r, "aria-label":
|
|
|
9995
10188
|
}
|
|
9996
10189
|
//#endregion
|
|
9997
10190
|
//#region src/components/ui/CharacterCount.tsx
|
|
9998
|
-
function
|
|
10191
|
+
function Ls({ value: e, maxLength: t, announcementDelay: n = 1e3, className: r, ...i }) {
|
|
9999
10192
|
let a = t - e.length, o = Math.abs(a), s = `${o} ${o === 1 ? "character" : "characters"} ${a < 0 ? "over the limit" : "remaining"}`, [c, u] = h(s);
|
|
10000
10193
|
return l(() => {
|
|
10001
10194
|
let e = setTimeout(() => u(s), n);
|
|
@@ -10017,7 +10210,7 @@ function ws({ value: e, maxLength: t, announcementDelay: n = 1e3, className: r,
|
|
|
10017
10210
|
}
|
|
10018
10211
|
//#endregion
|
|
10019
10212
|
//#region src/providers/ControlSizeProvider.tsx
|
|
10020
|
-
function
|
|
10213
|
+
function Rs({ size: e, children: t }) {
|
|
10021
10214
|
return /* @__PURE__ */ _(rn.Provider, {
|
|
10022
10215
|
value: e,
|
|
10023
10216
|
children: t
|
|
@@ -10025,7 +10218,7 @@ function Ts({ size: e, children: t }) {
|
|
|
10025
10218
|
}
|
|
10026
10219
|
//#endregion
|
|
10027
10220
|
//#region src/components/ui/ProgressBar.tsx
|
|
10028
|
-
var
|
|
10221
|
+
var zs = a(function({ label: e, value: t, min: n = 0, max: r = 100, color: i = "accent", striped: a = !1, animated: o = !1, id: s, className: c, ...l }, d) {
|
|
10029
10222
|
let f = u(), p = s ?? f;
|
|
10030
10223
|
if (!Number.isFinite(n) || !Number.isFinite(r) || r <= n) throw RangeError("ProgressBar requires a finite max greater than min");
|
|
10031
10224
|
if (t !== void 0 && !Number.isFinite(t)) throw RangeError("ProgressBar value must be finite");
|
|
@@ -10062,4 +10255,4 @@ var Es = a(function({ label: e, value: t, min: n = 0, max: r = 100, color: i = "
|
|
|
10062
10255
|
});
|
|
10063
10256
|
});
|
|
10064
10257
|
//#endregion
|
|
10065
|
-
export {
|
|
10258
|
+
export { qn as Alert, Pn as AppShell, He as AreaChart, js as AttachmentItem, Ms as AttachmentList, Jn as AuthCard, Fn as AuthLayout, Yn as AuthorByline, Lt as Avatar, In as BackLink, Qn as Badge, Ge as BarChart, ut as BottomNav, tn as Breadcrumbs, fn as Button, pt as COMMAND_PALETTE_EVENT, zi as Calendar, Ki as CalendarGrid, qi as Card, Ls as CharacterCount, zn as Checkbox, $i as CodeInput, Hn as ColumnPicker, ea as Combobox, vt as CommandPalette, Rs as ControlSizeProvider, Ai as DEFAULT_CALENDAR_LABELS, mt as DEFAULT_COMMAND_PALETTE_SHORTCUT, ta as DangerZone, Ps as DatePartsInput, ra as DatePicker, sa as DateRangePicker, pa as DateTimePicker, va as DetailPanel, Fa as Dialog, Ia as DialogActions, La as DividerLabel, qe as DonutChart, Ra as DropdownMenu, za as EmptyState, Ba as ErrorBoundary, ws as FieldError, Cs as FieldHint, Ts as Fieldset, Bn as FilterButton, Va as FilterDropdown, Ss as FormField, Ha as Kbd, Wa as LoadingSpinner, Ga as MetadataGrid, Ka as MetricCard, bt as MobileDrawer, Is as NavTabs, Za as OAuthButton, Qa as PageHeader, $a as PageSection, Un as Pagination, to as PaginationBar, ro as PasswordInput, oo as PasswordRequirements, so as ProfileHeader, zs as ProgressBar, co as ProseContent, lo as QrCapacityError, No as QrCode, Je as RadarChart, Ye as RadialBarChart, Os as Radio, ji as RadioPill, Gn as ResourceTable, Po as SearchInput, pn as SectionHeader, Fo as Select, xn as SelectDropdown, Io as SettingRow, Mt as SettingsContext, ys as SettingsProvider, Lo as SideSheet, $t as Sidebar, Fs as Skeleton, Sn as Slider, Xe as SparkLine, Bo as SplitPaneLayout, rt as StackedBarChart, Uo as StatusDot, Wo as StepProgress, Tn as THEME_MENU_EVENT, Go as Tabs, qo as TextInput, Ko as Textarea, es as ThemeContext, On as ThemeMenu, Cn as ThemePreview, xs as ThemeProvider, Jo as Timeline, Bt as ToastProvider, wn as Toggle, Qo as Toolbar, Zo as Tooltip, Mn as TopBar, $o as UploadDropzone, ot as VerticalBarChart, At as accentItems, Q as addDays, or as addMinutes, sr as addMonths, tr as calendarDateFromParts, Z as calendarDateParts, G as cn, Xr as createCalendarDateMath, Tt as darkThemes, mr as dateAtMinutes, io as defaultPasswordRequirements, dr as differenceInDays, Mo as encodeQrCode, Ur as expandAvailabilityRules, kt as fontOptions, is as formatDateLong, rs as formatDateShort, Mr as formatRangeTitle, as as formatRelative, Or as formatTime, gr as formatTimeOfDay, kr as formatTimeRange, vr as fromDateKey, Hr as getActiveResourceIds, wr as getViewRange, Sr as getVisibleDays, ct as handleAppShellNavigate, Yr as isAllDayLike, st as isAppShellPathActive, Ct as isLightTheme, ur as isSameDay, xr as isTimeGridView, Lr as layoutOverlaps, wt as lightThemes, gt as matchesCommandPaletteShortcut, ao as meetsPasswordRequirements, fr as minutesOfDay, lt as navigateToPath, ht as openCommandPalette, En as openThemeMenu, hr as parseTime, Nr as rangesOverlap, Tr as shiftDate, br as snapDate, yr as snapMinutes, Wn as sortRows, ar as startOfDay, lr as startOfMonth, cr as startOfWeek, Ot as themeDefaults, xt as themeItems, _r as toDateKey, nn as useApplyTheme, an as useControlSize, jt as useDismiss, ft as useFocusTrap, Nt as useSettings, ts as useTheme, zt as useToast };
|