@leonardaustin/ui 0.7.1 → 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 +4 -1
- package/dist/components/ui/Dialog.d.ts.map +1 -1
- package/dist/components/ui/SideSheet.d.ts.map +1 -1
- package/dist/index.js +296 -273
- package/dist/styles.css +125 -1
- 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,
|
|
@@ -2754,7 +2757,7 @@ function xn({ options: e, value: t, onChange: n, label: r, placeholder: i = "Sel
|
|
|
2754
2757
|
className: G("flex flex-col gap-1.5", a),
|
|
2755
2758
|
ref: p,
|
|
2756
2759
|
children: [r && /* @__PURE__ */ _("span", {
|
|
2757
|
-
className: "
|
|
2760
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
2758
2761
|
children: r
|
|
2759
2762
|
}), /* @__PURE__ */ v("div", {
|
|
2760
2763
|
className: "relative",
|
|
@@ -2810,7 +2813,7 @@ function Sn({ min: e, max: t, step: n = 1, value: r, onChange: i, onCommit: a, l
|
|
|
2810
2813
|
children: [(o || s) && /* @__PURE__ */ v("div", {
|
|
2811
2814
|
className: "flex items-center justify-between",
|
|
2812
2815
|
children: [o && /* @__PURE__ */ _("span", {
|
|
2813
|
-
className: "
|
|
2816
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
2814
2817
|
children: o
|
|
2815
2818
|
}), s && /* @__PURE__ */ _("span", {
|
|
2816
2819
|
className: "text-text-primary font-data text-xs",
|
|
@@ -2864,13 +2867,13 @@ function wn({ checked: e, onChange: t, disabled: n, label: r, className: i }) {
|
|
|
2864
2867
|
"aria-checked": e,
|
|
2865
2868
|
disabled: n,
|
|
2866
2869
|
onClick: () => t(!e),
|
|
2867
|
-
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"),
|
|
2868
2871
|
style: {
|
|
2869
2872
|
width: 36,
|
|
2870
2873
|
height: 20
|
|
2871
2874
|
},
|
|
2872
2875
|
children: /* @__PURE__ */ _("span", {
|
|
2873
|
-
className: "
|
|
2876
|
+
className: "ui-switch-knob absolute top-1/2 rounded-full transition-[left] duration-[100ms]",
|
|
2874
2877
|
style: {
|
|
2875
2878
|
width: 14,
|
|
2876
2879
|
height: 14,
|
|
@@ -3586,6 +3589,12 @@ function Gn({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: a =
|
|
|
3586
3589
|
//#endregion
|
|
3587
3590
|
//#region src/components/ui/Alert.tsx
|
|
3588
3591
|
var Kn = {
|
|
3592
|
+
neutral: {
|
|
3593
|
+
bg: "bg-bg-hover",
|
|
3594
|
+
border: "border-border",
|
|
3595
|
+
icon: I,
|
|
3596
|
+
iconColor: "text-text-tertiary"
|
|
3597
|
+
},
|
|
3589
3598
|
success: {
|
|
3590
3599
|
bg: "bg-green-muted",
|
|
3591
3600
|
border: "border-green/30",
|
|
@@ -3611,26 +3620,31 @@ var Kn = {
|
|
|
3611
3620
|
iconColor: "text-blue"
|
|
3612
3621
|
}
|
|
3613
3622
|
};
|
|
3614
|
-
function qn({ type: e, title: t, children: n, dismissible: r, className: i }) {
|
|
3615
|
-
let [
|
|
3616
|
-
if (
|
|
3617
|
-
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;
|
|
3618
3627
|
return /* @__PURE__ */ v("div", {
|
|
3619
|
-
|
|
3628
|
+
...s,
|
|
3629
|
+
className: G("flex gap-2.5 rounded-md border p-3", u.bg, u.border, i),
|
|
3620
3630
|
children: [
|
|
3621
|
-
/* @__PURE__ */ _(
|
|
3631
|
+
/* @__PURE__ */ _(d, { className: G("mt-0.5 h-4 w-4 shrink-0", u.iconColor) }),
|
|
3622
3632
|
/* @__PURE__ */ v("div", {
|
|
3623
3633
|
className: "min-w-0 flex-1",
|
|
3624
3634
|
children: [t && /* @__PURE__ */ _("p", {
|
|
3625
|
-
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"),
|
|
3626
3636
|
children: t
|
|
3627
3637
|
}), /* @__PURE__ */ _("div", {
|
|
3628
|
-
className: "text-text-secondary text-xs",
|
|
3638
|
+
className: G(o ? f : "text-text-secondary", "text-xs"),
|
|
3629
3639
|
children: n
|
|
3630
3640
|
})]
|
|
3631
3641
|
}),
|
|
3642
|
+
a ? /* @__PURE__ */ _("div", {
|
|
3643
|
+
className: "shrink-0 self-center",
|
|
3644
|
+
children: a
|
|
3645
|
+
}) : null,
|
|
3632
3646
|
r && /* @__PURE__ */ _("button", {
|
|
3633
|
-
onClick: () =>
|
|
3647
|
+
onClick: () => l(!0),
|
|
3634
3648
|
className: "text-text-tertiary hover:text-text-primary flex h-5 w-5 cursor-pointer items-center justify-center rounded",
|
|
3635
3649
|
"aria-label": "Dismiss",
|
|
3636
3650
|
children: /* @__PURE__ */ _(V, { className: "h-3 w-3" })
|
|
@@ -3692,6 +3706,8 @@ function Yn({ name: e, meta: t, nameAppend: n, size: r = "sm", className: i }) {
|
|
|
3692
3706
|
//#endregion
|
|
3693
3707
|
//#region src/components/ui/Badge.tsx
|
|
3694
3708
|
var Xn = {
|
|
3709
|
+
teal: "bg-teal-muted text-teal",
|
|
3710
|
+
rose: "bg-rose-muted text-rose",
|
|
3695
3711
|
green: "bg-green-muted text-green",
|
|
3696
3712
|
yellow: "bg-yellow-muted text-yellow",
|
|
3697
3713
|
red: "bg-red-muted text-red",
|
|
@@ -3699,6 +3715,8 @@ var Xn = {
|
|
|
3699
3715
|
purple: "bg-purple-muted text-purple",
|
|
3700
3716
|
gray: "bg-bg-hover text-text-secondary"
|
|
3701
3717
|
}, Zn = {
|
|
3718
|
+
teal: "bg-teal",
|
|
3719
|
+
rose: "bg-rose",
|
|
3702
3720
|
green: "bg-green",
|
|
3703
3721
|
yellow: "bg-yellow",
|
|
3704
3722
|
red: "bg-red",
|
|
@@ -6617,7 +6635,7 @@ function qi({ children: e, className: t, header: n, footer: r, as: i = "div", fl
|
|
|
6617
6635
|
children: n
|
|
6618
6636
|
}),
|
|
6619
6637
|
/* @__PURE__ */ _("div", {
|
|
6620
|
-
className: G(!a && "p-3", o),
|
|
6638
|
+
className: G(!a && "ui-surface-body p-3", o),
|
|
6621
6639
|
children: e
|
|
6622
6640
|
}),
|
|
6623
6641
|
r && /* @__PURE__ */ _("div", {
|
|
@@ -6782,7 +6800,7 @@ function ea({ options: e, value: t, onChange: n, onOptionChange: r, placeholder:
|
|
|
6782
6800
|
children: [
|
|
6783
6801
|
a && /* @__PURE__ */ _("span", {
|
|
6784
6802
|
id: se,
|
|
6785
|
-
className: "
|
|
6803
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
6786
6804
|
children: a
|
|
6787
6805
|
}),
|
|
6788
6806
|
d && /* @__PURE__ */ _("input", {
|
|
@@ -6960,7 +6978,7 @@ function ra({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
6960
6978
|
className: "flex flex-col gap-1.5",
|
|
6961
6979
|
ref: d,
|
|
6962
6980
|
children: [t && /* @__PURE__ */ _("span", {
|
|
6963
|
-
className: "
|
|
6981
|
+
className: "ui-field-label text-xs font-medium",
|
|
6964
6982
|
children: t
|
|
6965
6983
|
}), /* @__PURE__ */ v("div", {
|
|
6966
6984
|
className: "relative",
|
|
@@ -7049,7 +7067,7 @@ function sa({ controlSize: e, label: t, value: n, onChange: r, placeholder: i =
|
|
|
7049
7067
|
className: "flex flex-col gap-1.5",
|
|
7050
7068
|
ref: l,
|
|
7051
7069
|
children: [t && /* @__PURE__ */ _("span", {
|
|
7052
|
-
className: "
|
|
7070
|
+
className: "ui-field-label text-xs font-medium",
|
|
7053
7071
|
children: t
|
|
7054
7072
|
}), /* @__PURE__ */ v("div", {
|
|
7055
7073
|
className: "relative",
|
|
@@ -7246,7 +7264,7 @@ function ma({ controlSize: e, label: t, timeZone: n, value: r, onChange: i, plac
|
|
|
7246
7264
|
className: "flex flex-col gap-1.5",
|
|
7247
7265
|
ref: S,
|
|
7248
7266
|
children: [t && /* @__PURE__ */ _("span", {
|
|
7249
|
-
className: "
|
|
7267
|
+
className: "ui-field-label text-xs font-medium",
|
|
7250
7268
|
children: t
|
|
7251
7269
|
}), /* @__PURE__ */ v("div", {
|
|
7252
7270
|
className: "relative",
|
|
@@ -7456,11 +7474,16 @@ function Sa({ x: e, y: t }) {
|
|
|
7456
7474
|
}
|
|
7457
7475
|
//#endregion
|
|
7458
7476
|
//#region src/components/ui/Dialog.tsx
|
|
7459
|
-
var Ca =
|
|
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 = {
|
|
7460
7483
|
x: 0,
|
|
7461
7484
|
y: 0
|
|
7462
7485
|
};
|
|
7463
|
-
function
|
|
7486
|
+
function Da(e) {
|
|
7464
7487
|
let t = e.getBoundingClientRect();
|
|
7465
7488
|
return {
|
|
7466
7489
|
left: t.left,
|
|
@@ -7469,19 +7492,19 @@ function Ea(e) {
|
|
|
7469
7492
|
bottom: t.top + e.clientHeight
|
|
7470
7493
|
};
|
|
7471
7494
|
}
|
|
7472
|
-
var
|
|
7495
|
+
var Oa = {
|
|
7473
7496
|
top: "bottom",
|
|
7474
7497
|
bottom: "top",
|
|
7475
7498
|
left: "right",
|
|
7476
7499
|
right: "left"
|
|
7477
7500
|
};
|
|
7478
|
-
function
|
|
7501
|
+
function ka(e, t) {
|
|
7479
7502
|
return {
|
|
7480
7503
|
x: e.x + t.x,
|
|
7481
7504
|
y: e.y + t.y
|
|
7482
7505
|
};
|
|
7483
7506
|
}
|
|
7484
|
-
function
|
|
7507
|
+
function Aa(e, t) {
|
|
7485
7508
|
let n = t.getBoundingClientRect();
|
|
7486
7509
|
return {
|
|
7487
7510
|
left: n.left + e.offsetLeft - t.scrollLeft,
|
|
@@ -7490,65 +7513,65 @@ function ka(e, t) {
|
|
|
7490
7513
|
height: e.offsetHeight
|
|
7491
7514
|
};
|
|
7492
7515
|
}
|
|
7493
|
-
function
|
|
7516
|
+
function ja(e, t) {
|
|
7494
7517
|
if (!(e instanceof HTMLElement) || !e.isConnected) return null;
|
|
7495
7518
|
let n = e.ownerDocument;
|
|
7496
7519
|
return e === n.body || e === n.documentElement || t.contains(e) ? null : e.getClientRects().length > 0 ? e : null;
|
|
7497
7520
|
}
|
|
7498
|
-
function ja(e) {
|
|
7499
|
-
return e.ownerDocument.defaultView?.matchMedia(Ca).matches ?? !1;
|
|
7500
|
-
}
|
|
7501
7521
|
function Ma(e) {
|
|
7522
|
+
return e.ownerDocument.defaultView?.matchMedia(wa).matches ?? !1;
|
|
7523
|
+
}
|
|
7524
|
+
function Na(e) {
|
|
7502
7525
|
let t = e.ownerDocument.defaultView;
|
|
7503
7526
|
return t ? ya(t.getComputedStyle(e).getPropertyValue("--spacing"), parseFloat(t.getComputedStyle(e.ownerDocument.documentElement).fontSize)) : 8;
|
|
7504
7527
|
}
|
|
7505
|
-
function
|
|
7506
|
-
let s = m(
|
|
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;
|
|
7507
7530
|
f(() => {
|
|
7508
7531
|
let f = a.current, m = h ? o.current : null, g = f?.parentElement, _ = f?.ownerDocument.defaultView, v = r !== "center";
|
|
7509
7532
|
(!n || !t) && (d.current = null);
|
|
7510
7533
|
let y = n && m !== null;
|
|
7511
7534
|
if (!e || !f || !g || !_ || !m && !v) return;
|
|
7512
|
-
let b = v ?
|
|
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 = () => {
|
|
7513
7536
|
f.style.translate = Sa(S());
|
|
7514
7537
|
}, w = () => {
|
|
7515
|
-
let e =
|
|
7538
|
+
let e = Aa(f, g);
|
|
7516
7539
|
if (p.current && d.current) {
|
|
7517
7540
|
c.current = {
|
|
7518
7541
|
x: d.current.left - e.left,
|
|
7519
7542
|
y: d.current.top - e.top
|
|
7520
|
-
}, s.current =
|
|
7543
|
+
}, s.current = Ea, f.dataset.placement = "remembered", f.style.transformOrigin = "";
|
|
7521
7544
|
return;
|
|
7522
7545
|
}
|
|
7523
|
-
let t =
|
|
7546
|
+
let t = Ma(f) ? x() : null, n = v && t ? yn(r, t.getBoundingClientRect(), {
|
|
7524
7547
|
size: {
|
|
7525
7548
|
width: e.width,
|
|
7526
7549
|
height: e.height
|
|
7527
7550
|
},
|
|
7528
|
-
bounds:
|
|
7551
|
+
bounds: Da(g),
|
|
7529
7552
|
margin: l.current,
|
|
7530
7553
|
gap: l.current
|
|
7531
7554
|
}) : null;
|
|
7532
7555
|
c.current = n ? {
|
|
7533
7556
|
x: n.left - e.left,
|
|
7534
7557
|
y: n.top - e.top
|
|
7535
|
-
} :
|
|
7558
|
+
} : Ea, f.dataset.placement = n?.side ?? "center", f.style.transformOrigin = n ? Oa[n.side] : "";
|
|
7536
7559
|
}, T = () => {
|
|
7537
7560
|
let e = s.current;
|
|
7538
7561
|
if (!m || !p.current && e.x === 0 && e.y === 0) return;
|
|
7539
|
-
let t = S(), n = xa(t, t, f.getBoundingClientRect(), m.getBoundingClientRect(),
|
|
7562
|
+
let t = S(), n = xa(t, t, f.getBoundingClientRect(), m.getBoundingClientRect(), Da(g), l.current);
|
|
7540
7563
|
if (s.current = {
|
|
7541
7564
|
x: n.x - c.current.x,
|
|
7542
7565
|
y: n.y - c.current.y
|
|
7543
7566
|
}, C(), p.current) {
|
|
7544
|
-
let e =
|
|
7567
|
+
let e = Aa(f, g);
|
|
7545
7568
|
d.current = {
|
|
7546
7569
|
left: e.left + n.x,
|
|
7547
7570
|
top: e.top + n.y
|
|
7548
7571
|
};
|
|
7549
7572
|
}
|
|
7550
7573
|
}, E = () => {
|
|
7551
|
-
l.current =
|
|
7574
|
+
l.current = Na(f), Ma(f) || (u.current = null, s.current = Ea, p.current = !1, d.current = null), u.current || w(), C(), T();
|
|
7552
7575
|
}, D = 0, O = () => {
|
|
7553
7576
|
D ||= _.requestAnimationFrame(() => {
|
|
7554
7577
|
D = 0, E();
|
|
@@ -7560,7 +7583,7 @@ function Na({ open: e, draggable: t, remember: n, placement: r, anchorRef: i },
|
|
|
7560
7583
|
capture: !0,
|
|
7561
7584
|
passive: !0
|
|
7562
7585
|
}), f.addEventListener("animationend", k), A?.observe(f), () => {
|
|
7563
|
-
_.cancelAnimationFrame(D), _.removeEventListener("resize", O), _.removeEventListener("scroll", O, { capture: !0 }), f.removeEventListener("animationend", k), A?.disconnect(), u.current = null, c.current =
|
|
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;
|
|
7564
7587
|
};
|
|
7565
7588
|
}, [
|
|
7566
7589
|
e,
|
|
@@ -7575,15 +7598,15 @@ function Na({ open: e, draggable: t, remember: n, placement: r, anchorRef: i },
|
|
|
7575
7598
|
let g = (e) => {
|
|
7576
7599
|
let t = a.current, n = e.currentTarget, r = t?.parentElement;
|
|
7577
7600
|
if (!t || !r || e.button !== 0 || !e.isPrimary) return;
|
|
7578
|
-
let i = e.target.closest(
|
|
7579
|
-
i && n.contains(i) || !
|
|
7601
|
+
let i = e.target.closest(Ta);
|
|
7602
|
+
i && n.contains(i) || !Ma(t) || (e.preventDefault(), n.setPointerCapture(e.pointerId), u.current = {
|
|
7580
7603
|
pointerId: e.pointerId,
|
|
7581
7604
|
startX: e.clientX,
|
|
7582
7605
|
startY: e.clientY,
|
|
7583
|
-
origin:
|
|
7606
|
+
origin: ka(c.current, s.current),
|
|
7584
7607
|
dialog: t.getBoundingClientRect(),
|
|
7585
7608
|
handle: n.getBoundingClientRect(),
|
|
7586
|
-
bounds:
|
|
7609
|
+
bounds: Da(r),
|
|
7587
7610
|
margin: l.current,
|
|
7588
7611
|
moved: !1
|
|
7589
7612
|
});
|
|
@@ -7604,11 +7627,11 @@ function Na({ open: e, draggable: t, remember: n, placement: r, anchorRef: i },
|
|
|
7604
7627
|
u.current = null;
|
|
7605
7628
|
let r = a.current, i = r?.parentElement;
|
|
7606
7629
|
if (!n || !t.moved || !r || !i) return;
|
|
7607
|
-
let o =
|
|
7630
|
+
let o = ka(c.current, s.current), l = Aa(r, i);
|
|
7608
7631
|
d.current = {
|
|
7609
7632
|
left: l.left + o.x,
|
|
7610
7633
|
top: l.top + o.y
|
|
7611
|
-
}, c.current = o, s.current =
|
|
7634
|
+
}, c.current = o, s.current = Ea, p.current = !0, r.dataset.placement = "remembered", r.style.transformOrigin = "";
|
|
7612
7635
|
};
|
|
7613
7636
|
if (h) return {
|
|
7614
7637
|
onPointerDown: g,
|
|
@@ -7618,23 +7641,23 @@ function Na({ open: e, draggable: t, remember: n, placement: r, anchorRef: i },
|
|
|
7618
7641
|
onLostPointerCapture: v
|
|
7619
7642
|
};
|
|
7620
7643
|
}
|
|
7621
|
-
function
|
|
7622
|
-
let
|
|
7623
|
-
ft(
|
|
7624
|
-
initialFocusRef:
|
|
7625
|
-
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
|
|
7626
7649
|
});
|
|
7627
|
-
let
|
|
7650
|
+
let j = Pa({
|
|
7628
7651
|
open: e,
|
|
7629
|
-
draggable:
|
|
7630
|
-
remember:
|
|
7631
|
-
placement:
|
|
7632
|
-
anchorRef:
|
|
7633
|
-
},
|
|
7652
|
+
draggable: s,
|
|
7653
|
+
remember: c,
|
|
7654
|
+
placement: d,
|
|
7655
|
+
anchorRef: f
|
|
7656
|
+
}, D, O);
|
|
7634
7657
|
return l(() => {
|
|
7635
7658
|
if (!e) return;
|
|
7636
7659
|
let n = (e) => {
|
|
7637
|
-
e.key === "Escape" &&
|
|
7660
|
+
e.key === "Escape" && C && !S && (e.preventDefault(), t());
|
|
7638
7661
|
};
|
|
7639
7662
|
document.addEventListener("keydown", n);
|
|
7640
7663
|
let r = document.body.style.overflow;
|
|
@@ -7644,43 +7667,43 @@ function Pa({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
7644
7667
|
}, [
|
|
7645
7668
|
e,
|
|
7646
7669
|
t,
|
|
7647
|
-
|
|
7648
|
-
|
|
7670
|
+
C,
|
|
7671
|
+
S
|
|
7649
7672
|
]), e ? H(/* @__PURE__ */ v("div", {
|
|
7650
7673
|
className: "fixed inset-0 z-50 flex items-start justify-center overflow-y-auto pt-4 md:pt-[5vh]",
|
|
7651
7674
|
children: [/* @__PURE__ */ _("div", {
|
|
7652
7675
|
className: "bg-bg-overlay fixed inset-0",
|
|
7653
7676
|
onClick: () => {
|
|
7654
|
-
|
|
7677
|
+
w && !S && t();
|
|
7655
7678
|
},
|
|
7656
7679
|
"aria-hidden": "true"
|
|
7657
7680
|
}), /* @__PURE__ */ v("div", {
|
|
7658
|
-
ref:
|
|
7659
|
-
className: G(
|
|
7660
|
-
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,
|
|
7661
7684
|
tabIndex: -1,
|
|
7662
|
-
"aria-busy":
|
|
7685
|
+
"aria-busy": S || void 0,
|
|
7663
7686
|
"aria-modal": "true",
|
|
7664
|
-
"aria-labelledby": n ?
|
|
7665
|
-
"aria-label":
|
|
7666
|
-
"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,
|
|
7667
7690
|
children: [
|
|
7668
|
-
(n || !
|
|
7669
|
-
ref:
|
|
7670
|
-
"data-control-size":
|
|
7671
|
-
className: G("ui-bar border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2.5",
|
|
7672
|
-
...
|
|
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,
|
|
7673
7696
|
children: [n && /* @__PURE__ */ _("h3", {
|
|
7674
|
-
id:
|
|
7697
|
+
id: k,
|
|
7675
7698
|
className: "text-text-primary min-w-0 text-sm font-medium",
|
|
7676
7699
|
children: n
|
|
7677
|
-
}), !
|
|
7700
|
+
}), !T && /* @__PURE__ */ _(fn, {
|
|
7678
7701
|
type: "button",
|
|
7679
7702
|
variant: "icon",
|
|
7680
7703
|
size: "sm",
|
|
7681
|
-
"aria-disabled":
|
|
7704
|
+
"aria-disabled": S || void 0,
|
|
7682
7705
|
onClick: () => {
|
|
7683
|
-
|
|
7706
|
+
S || t();
|
|
7684
7707
|
},
|
|
7685
7708
|
className: "ml-auto shrink-0",
|
|
7686
7709
|
"aria-label": "Close",
|
|
@@ -7688,15 +7711,15 @@ function Pa({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
7688
7711
|
})]
|
|
7689
7712
|
}),
|
|
7690
7713
|
/* @__PURE__ */ v("div", {
|
|
7691
|
-
className: "p-3",
|
|
7692
|
-
children: [
|
|
7693
|
-
id:
|
|
7714
|
+
className: "ui-surface-body p-3",
|
|
7715
|
+
children: [h && /* @__PURE__ */ _("div", {
|
|
7716
|
+
id: A,
|
|
7694
7717
|
className: "text-text-secondary mb-3 text-xs",
|
|
7695
|
-
children:
|
|
7718
|
+
children: h
|
|
7696
7719
|
}), r]
|
|
7697
7720
|
}),
|
|
7698
7721
|
i && /* @__PURE__ */ _("div", {
|
|
7699
|
-
"data-control-size":
|
|
7722
|
+
"data-control-size": E,
|
|
7700
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",
|
|
7701
7724
|
children: i
|
|
7702
7725
|
})
|
|
@@ -7706,7 +7729,7 @@ function Pa({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
7706
7729
|
}
|
|
7707
7730
|
//#endregion
|
|
7708
7731
|
//#region src/components/ui/DialogActions.tsx
|
|
7709
|
-
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 }) {
|
|
7710
7733
|
return /* @__PURE__ */ v("div", {
|
|
7711
7734
|
className: G("flex justify-end gap-2", a),
|
|
7712
7735
|
"aria-busy": o || void 0,
|
|
@@ -7735,7 +7758,7 @@ function Fa({ onCancel: e, onConfirm: t, cancelLabel: n = "Cancel", confirmLabel
|
|
|
7735
7758
|
}
|
|
7736
7759
|
//#endregion
|
|
7737
7760
|
//#region src/components/ui/DividerLabel.tsx
|
|
7738
|
-
function
|
|
7761
|
+
function La({ children: e, className: t }) {
|
|
7739
7762
|
return /* @__PURE__ */ v("div", {
|
|
7740
7763
|
className: G("my-6 flex items-center gap-3", t),
|
|
7741
7764
|
children: [
|
|
@@ -7750,7 +7773,7 @@ function Ia({ children: e, className: t }) {
|
|
|
7750
7773
|
}
|
|
7751
7774
|
//#endregion
|
|
7752
7775
|
//#region src/components/ui/DropdownMenu.tsx
|
|
7753
|
-
function
|
|
7776
|
+
function Ra({ trigger: e, items: t, align: n = "right" }) {
|
|
7754
7777
|
let [r, i] = h(!1), [a, o] = h({
|
|
7755
7778
|
top: 0,
|
|
7756
7779
|
left: 0,
|
|
@@ -7831,7 +7854,7 @@ function La({ trigger: e, items: t, align: n = "right" }) {
|
|
|
7831
7854
|
}
|
|
7832
7855
|
//#endregion
|
|
7833
7856
|
//#region src/components/ui/EmptyState.tsx
|
|
7834
|
-
function
|
|
7857
|
+
function za({ icon: e, title: t, description: n, action: r, className: i }) {
|
|
7835
7858
|
return /* @__PURE__ */ v("div", {
|
|
7836
7859
|
className: G("flex flex-col items-center justify-center px-4 py-12", i),
|
|
7837
7860
|
children: [
|
|
@@ -7856,7 +7879,7 @@ function Ra({ icon: e, title: t, description: n, action: r, className: i }) {
|
|
|
7856
7879
|
}
|
|
7857
7880
|
//#endregion
|
|
7858
7881
|
//#region src/components/ui/ErrorBoundary.tsx
|
|
7859
|
-
var
|
|
7882
|
+
var Ba = class extends e {
|
|
7860
7883
|
state = {
|
|
7861
7884
|
hasError: !1,
|
|
7862
7885
|
error: null
|
|
@@ -7898,8 +7921,8 @@ var za = class extends e {
|
|
|
7898
7921
|
};
|
|
7899
7922
|
//#endregion
|
|
7900
7923
|
//#region src/components/ui/FilterDropdown.tsx
|
|
7901
|
-
function
|
|
7902
|
-
return /* @__PURE__ */ _(
|
|
7924
|
+
function Va({ icon: e, children: t, items: n, align: r, className: i }) {
|
|
7925
|
+
return /* @__PURE__ */ _(Ra, {
|
|
7903
7926
|
align: r,
|
|
7904
7927
|
trigger: /* @__PURE__ */ _(Bn, {
|
|
7905
7928
|
icon: e,
|
|
@@ -7911,7 +7934,7 @@ function Ba({ icon: e, children: t, items: n, align: r, className: i }) {
|
|
|
7911
7934
|
}
|
|
7912
7935
|
//#endregion
|
|
7913
7936
|
//#region src/components/ui/Kbd.tsx
|
|
7914
|
-
function
|
|
7937
|
+
function Ha({ children: e, className: t }) {
|
|
7915
7938
|
return /* @__PURE__ */ _("kbd", {
|
|
7916
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),
|
|
7917
7940
|
children: e
|
|
@@ -7919,20 +7942,20 @@ function Va({ children: e, className: t }) {
|
|
|
7919
7942
|
}
|
|
7920
7943
|
//#endregion
|
|
7921
7944
|
//#region src/components/ui/LoadingSpinner.tsx
|
|
7922
|
-
var
|
|
7945
|
+
var Ua = {
|
|
7923
7946
|
sm: "w-4 h-4",
|
|
7924
7947
|
md: "w-6 h-6",
|
|
7925
7948
|
lg: "w-8 h-8"
|
|
7926
7949
|
};
|
|
7927
|
-
function
|
|
7950
|
+
function Wa({ className: e, size: t = "md" }) {
|
|
7928
7951
|
return /* @__PURE__ */ _("div", {
|
|
7929
7952
|
className: G("flex min-h-[200px] items-center justify-center", e),
|
|
7930
|
-
children: /* @__PURE__ */ _(L, { className: G("text-accent animate-spin",
|
|
7953
|
+
children: /* @__PURE__ */ _(L, { className: G("text-accent animate-spin", Ua[t]) })
|
|
7931
7954
|
});
|
|
7932
7955
|
}
|
|
7933
7956
|
//#endregion
|
|
7934
7957
|
//#region src/components/ui/MetadataGrid.tsx
|
|
7935
|
-
function
|
|
7958
|
+
function Ga({ items: e, labelWidth: n = "100px", className: r }) {
|
|
7936
7959
|
return /* @__PURE__ */ _("div", {
|
|
7937
7960
|
className: G("gap-x-3 gap-y-2 text-xs", r),
|
|
7938
7961
|
style: {
|
|
@@ -7950,7 +7973,7 @@ function Wa({ items: e, labelWidth: n = "100px", className: r }) {
|
|
|
7950
7973
|
}
|
|
7951
7974
|
//#endregion
|
|
7952
7975
|
//#region src/components/ui/MetricCard.tsx
|
|
7953
|
-
function
|
|
7976
|
+
function Ka({ label: e, value: t, sub: n, trend: r, bar: i, icon: a, iconColor: o, className: s }) {
|
|
7954
7977
|
let c = r?.tone === "positive" ? "text-green" : r?.tone === "negative" ? "text-red" : "text-text-tertiary";
|
|
7955
7978
|
return /* @__PURE__ */ v("div", {
|
|
7956
7979
|
className: G("bg-bg-secondary border-border relative overflow-hidden rounded-md border p-3", s),
|
|
@@ -7990,7 +8013,7 @@ function Ga({ label: e, value: t, sub: n, trend: r, bar: i, icon: a, iconColor:
|
|
|
7990
8013
|
}
|
|
7991
8014
|
//#endregion
|
|
7992
8015
|
//#region src/components/ui/OAuthButton.tsx
|
|
7993
|
-
function
|
|
8016
|
+
function qa() {
|
|
7994
8017
|
return /* @__PURE__ */ v("svg", {
|
|
7995
8018
|
className: "h-3.5 w-3.5",
|
|
7996
8019
|
viewBox: "0 0 24 24",
|
|
@@ -8015,7 +8038,7 @@ function Ka() {
|
|
|
8015
8038
|
]
|
|
8016
8039
|
});
|
|
8017
8040
|
}
|
|
8018
|
-
function
|
|
8041
|
+
function Ja() {
|
|
8019
8042
|
return /* @__PURE__ */ _("svg", {
|
|
8020
8043
|
className: "h-3.5 w-3.5",
|
|
8021
8044
|
viewBox: "0 0 24 24",
|
|
@@ -8024,25 +8047,25 @@ function qa() {
|
|
|
8024
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" })
|
|
8025
8048
|
});
|
|
8026
8049
|
}
|
|
8027
|
-
var
|
|
8050
|
+
var Ya = {
|
|
8028
8051
|
github: "GitHub",
|
|
8029
8052
|
google: "Google"
|
|
8030
|
-
},
|
|
8031
|
-
github:
|
|
8032
|
-
google:
|
|
8053
|
+
}, Xa = {
|
|
8054
|
+
github: Ja,
|
|
8055
|
+
google: qa
|
|
8033
8056
|
};
|
|
8034
|
-
function
|
|
8035
|
-
let r =
|
|
8057
|
+
function Za({ provider: e, children: t, ...n }) {
|
|
8058
|
+
let r = Xa[e];
|
|
8036
8059
|
return /* @__PURE__ */ v(fn, {
|
|
8037
8060
|
variant: "secondary",
|
|
8038
8061
|
size: "md",
|
|
8039
8062
|
...n,
|
|
8040
|
-
children: [/* @__PURE__ */ _(r, {}), t ??
|
|
8063
|
+
children: [/* @__PURE__ */ _(r, {}), t ?? Ya[e]]
|
|
8041
8064
|
});
|
|
8042
8065
|
}
|
|
8043
8066
|
//#endregion
|
|
8044
8067
|
//#region src/components/ui/PageHeader.tsx
|
|
8045
|
-
function
|
|
8068
|
+
function Qa({ title: e, subtitle: t, actions: n, className: r, eyebrow: i, headingLevel: a = 1, wrap: o = !1 }) {
|
|
8046
8069
|
let s = `h${a}`;
|
|
8047
8070
|
return /* @__PURE__ */ v("div", {
|
|
8048
8071
|
className: G("flex items-center justify-between gap-3", o && "flex-wrap", r),
|
|
@@ -8070,7 +8093,7 @@ function Za({ title: e, subtitle: t, actions: n, className: r, eyebrow: i, headi
|
|
|
8070
8093
|
}
|
|
8071
8094
|
//#endregion
|
|
8072
8095
|
//#region src/components/ui/PageSection.tsx
|
|
8073
|
-
function
|
|
8096
|
+
function $a({ title: e, description: t, actions: n, children: r, as: i = "h2", className: a, headerClassName: o, contentClassName: s }) {
|
|
8074
8097
|
return /* @__PURE__ */ v("section", {
|
|
8075
8098
|
className: G("space-y-4", a),
|
|
8076
8099
|
children: [(e || t || n) && /* @__PURE__ */ v("div", {
|
|
@@ -8096,7 +8119,7 @@ function Qa({ title: e, description: t, actions: n, children: r, as: i = "h2", c
|
|
|
8096
8119
|
}
|
|
8097
8120
|
//#endregion
|
|
8098
8121
|
//#region src/components/ui/PaginationBar.tsx
|
|
8099
|
-
var
|
|
8122
|
+
var eo = [
|
|
8100
8123
|
{
|
|
8101
8124
|
value: "10",
|
|
8102
8125
|
label: "10 per page"
|
|
@@ -8110,7 +8133,7 @@ var $a = [
|
|
|
8110
8133
|
label: "50 per page"
|
|
8111
8134
|
}
|
|
8112
8135
|
];
|
|
8113
|
-
function
|
|
8136
|
+
function to({ page: e, pageSize: t, total: n, pageSizeOptions: r = eo, onPageChange: i, onPageSizeChange: a, className: o }) {
|
|
8114
8137
|
let s = Math.ceil(n / t), c = Math.min((e - 1) * t + 1, n), l = Math.min(e * t, n);
|
|
8115
8138
|
return /* @__PURE__ */ v("div", {
|
|
8116
8139
|
className: G("flex items-center justify-between", o),
|
|
@@ -8141,7 +8164,7 @@ function eo({ page: e, pageSize: t, total: n, pageSizeOptions: r = $a, onPageCha
|
|
|
8141
8164
|
}
|
|
8142
8165
|
//#endregion
|
|
8143
8166
|
//#region src/components/ui/useFieldControl.ts
|
|
8144
|
-
function
|
|
8167
|
+
function no({ id: e, error: t, hint: n, describedBy: r, invalid: i, required: a }) {
|
|
8145
8168
|
let o = u(), s = c(Ln), l = e ?? s?.id ?? o, d = t ? `${l}-error` : void 0, f = n ? `${l}-hint` : void 0;
|
|
8146
8169
|
return {
|
|
8147
8170
|
inputId: l,
|
|
@@ -8154,8 +8177,8 @@ function to({ id: e, error: t, hint: n, describedBy: r, invalid: i, required: a
|
|
|
8154
8177
|
}
|
|
8155
8178
|
//#endregion
|
|
8156
8179
|
//#region src/components/ui/PasswordInput.tsx
|
|
8157
|
-
var
|
|
8158
|
-
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({
|
|
8159
8182
|
id: r,
|
|
8160
8183
|
error: t,
|
|
8161
8184
|
hint: i,
|
|
@@ -8175,7 +8198,7 @@ var no = a(({ label: e, error: t, className: n, id: r, hint: i, controlSize: a,
|
|
|
8175
8198
|
className: "flex items-center justify-between",
|
|
8176
8199
|
children: [e && /* @__PURE__ */ _("label", {
|
|
8177
8200
|
htmlFor: f,
|
|
8178
|
-
className: "
|
|
8201
|
+
className: "ui-field-label text-xs font-medium",
|
|
8179
8202
|
children: e
|
|
8180
8203
|
}), t && /* @__PURE__ */ _("p", {
|
|
8181
8204
|
id: p,
|
|
@@ -8207,8 +8230,8 @@ var no = a(({ label: e, error: t, className: n, id: r, hint: i, controlSize: a,
|
|
|
8207
8230
|
]
|
|
8208
8231
|
});
|
|
8209
8232
|
});
|
|
8210
|
-
|
|
8211
|
-
var
|
|
8233
|
+
ro.displayName = "PasswordInput";
|
|
8234
|
+
var io = Object.freeze([
|
|
8212
8235
|
{
|
|
8213
8236
|
label: "At least 8 characters",
|
|
8214
8237
|
test: (e) => e.length >= 8
|
|
@@ -8226,12 +8249,12 @@ var ro = Object.freeze([
|
|
|
8226
8249
|
test: (e) => /\d/.test(e)
|
|
8227
8250
|
}
|
|
8228
8251
|
]);
|
|
8229
|
-
function
|
|
8252
|
+
function ao(e, t = io) {
|
|
8230
8253
|
return t.every((t) => t.test(e));
|
|
8231
8254
|
}
|
|
8232
8255
|
//#endregion
|
|
8233
8256
|
//#region src/components/ui/PasswordRequirements.tsx
|
|
8234
|
-
function
|
|
8257
|
+
function oo({ password: e, requirements: t = io, showWhenEmpty: n = !1, className: r }) {
|
|
8235
8258
|
return !n && e.length === 0 ? null : /* @__PURE__ */ _("ul", {
|
|
8236
8259
|
"aria-label": "Password requirements",
|
|
8237
8260
|
className: G("space-y-1", r),
|
|
@@ -8258,7 +8281,7 @@ function ao({ password: e, requirements: t = ro, showWhenEmpty: n = !1, classNam
|
|
|
8258
8281
|
}
|
|
8259
8282
|
//#endregion
|
|
8260
8283
|
//#region src/components/ui/ProfileHeader.tsx
|
|
8261
|
-
function
|
|
8284
|
+
function so({ name: e, subtitle: t, badge: n, meta: r, action: i, className: a }) {
|
|
8262
8285
|
return /* @__PURE__ */ v("div", {
|
|
8263
8286
|
className: G("flex items-start gap-4", a),
|
|
8264
8287
|
children: [
|
|
@@ -8306,7 +8329,7 @@ function oo({ name: e, subtitle: t, badge: n, meta: r, action: i, className: a }
|
|
|
8306
8329
|
}
|
|
8307
8330
|
//#endregion
|
|
8308
8331
|
//#region src/components/ui/ProseContent.tsx
|
|
8309
|
-
function
|
|
8332
|
+
function co({ children: e, className: t }) {
|
|
8310
8333
|
return /* @__PURE__ */ _("div", {
|
|
8311
8334
|
className: G("ui-prose", t),
|
|
8312
8335
|
children: e
|
|
@@ -8314,21 +8337,21 @@ function so({ children: e, className: t }) {
|
|
|
8314
8337
|
}
|
|
8315
8338
|
//#endregion
|
|
8316
8339
|
//#region src/lib/qrCode.ts
|
|
8317
|
-
var
|
|
8340
|
+
var lo = class extends RangeError {
|
|
8318
8341
|
constructor() {
|
|
8319
8342
|
super("Text is too long to encode as a QR code"), this.name = "QrCapacityError";
|
|
8320
8343
|
}
|
|
8321
|
-
},
|
|
8344
|
+
}, uo = {
|
|
8322
8345
|
L: 0,
|
|
8323
8346
|
M: 1,
|
|
8324
8347
|
Q: 2,
|
|
8325
8348
|
H: 3
|
|
8326
|
-
},
|
|
8349
|
+
}, fo = {
|
|
8327
8350
|
L: 1,
|
|
8328
8351
|
M: 0,
|
|
8329
8352
|
Q: 3,
|
|
8330
8353
|
H: 2
|
|
8331
|
-
},
|
|
8354
|
+
}, po = [
|
|
8332
8355
|
[
|
|
8333
8356
|
-1,
|
|
8334
8357
|
7,
|
|
@@ -8501,7 +8524,7 @@ var co = class extends RangeError {
|
|
|
8501
8524
|
30,
|
|
8502
8525
|
30
|
|
8503
8526
|
]
|
|
8504
|
-
],
|
|
8527
|
+
], mo = [
|
|
8505
8528
|
[
|
|
8506
8529
|
-1,
|
|
8507
8530
|
1,
|
|
@@ -8675,7 +8698,7 @@ var co = class extends RangeError {
|
|
|
8675
8698
|
81
|
|
8676
8699
|
]
|
|
8677
8700
|
];
|
|
8678
|
-
function
|
|
8701
|
+
function ho(e) {
|
|
8679
8702
|
let t = (16 * e + 128) * e + 64;
|
|
8680
8703
|
if (e >= 2) {
|
|
8681
8704
|
let n = Math.floor(e / 7) + 2;
|
|
@@ -8683,43 +8706,43 @@ function mo(e) {
|
|
|
8683
8706
|
}
|
|
8684
8707
|
return t;
|
|
8685
8708
|
}
|
|
8686
|
-
function
|
|
8687
|
-
let n =
|
|
8688
|
-
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];
|
|
8689
8712
|
}
|
|
8690
|
-
function
|
|
8713
|
+
function _o(e) {
|
|
8691
8714
|
if (e === 1) return [];
|
|
8692
8715
|
let t = Math.floor(e / 7) + 2, n = Math.floor((e * 8 + t * 3 + 5) / (t * 4 - 4)) * 2, r = [6];
|
|
8693
8716
|
for (let i = e * 4 + 17 - 7; r.length < t; i -= n) r.splice(1, 0, i);
|
|
8694
8717
|
return r;
|
|
8695
8718
|
}
|
|
8696
|
-
function
|
|
8719
|
+
function vo(e, t) {
|
|
8697
8720
|
let n = 0;
|
|
8698
8721
|
for (let r = 7; r >= 0; r--) n = n << 1 ^ (n >>> 7) * 285, n ^= (t >>> r & 1) * e;
|
|
8699
8722
|
return n;
|
|
8700
8723
|
}
|
|
8701
|
-
function
|
|
8724
|
+
function yo(e) {
|
|
8702
8725
|
let t = Array(e).fill(0);
|
|
8703
8726
|
t[e - 1] = 1;
|
|
8704
8727
|
let n = 1;
|
|
8705
8728
|
for (let r = 0; r < e; r++) {
|
|
8706
|
-
for (let e = 0; e < t.length; e++) t[e] =
|
|
8707
|
-
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);
|
|
8708
8731
|
}
|
|
8709
8732
|
return t;
|
|
8710
8733
|
}
|
|
8711
|
-
function
|
|
8734
|
+
function bo(e, t) {
|
|
8712
8735
|
let n = Array(t.length).fill(0);
|
|
8713
8736
|
for (let r of e) {
|
|
8714
8737
|
let e = r ^ n.shift();
|
|
8715
8738
|
n.push(0), t.forEach((t, r) => {
|
|
8716
|
-
n[r] ^=
|
|
8739
|
+
n[r] ^= vo(t, e);
|
|
8717
8740
|
});
|
|
8718
8741
|
}
|
|
8719
8742
|
return n;
|
|
8720
8743
|
}
|
|
8721
|
-
function
|
|
8722
|
-
let r =
|
|
8744
|
+
function xo(e, t, n) {
|
|
8745
|
+
let r = go(t, n) * 8, i = [], a = (e, t) => {
|
|
8723
8746
|
for (let n = t - 1; n >= 0; n--) i.push(e >>> n & 1);
|
|
8724
8747
|
};
|
|
8725
8748
|
a(4, 4), a(e.length, t <= 9 ? 8 : 16);
|
|
@@ -8730,12 +8753,12 @@ function bo(e, t, n) {
|
|
|
8730
8753
|
for (let e = 0; e < i.length; e += 8) o.push(i.slice(e, e + 8).reduce((e, t) => e << 1 | t));
|
|
8731
8754
|
return o;
|
|
8732
8755
|
}
|
|
8733
|
-
function
|
|
8734
|
-
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 = [];
|
|
8735
8758
|
for (let t = 0, n = 0; t < i; t++) {
|
|
8736
8759
|
let r = c - a + (t < s ? 0 : 1), i = e.slice(n, n + r);
|
|
8737
8760
|
n += r;
|
|
8738
|
-
let o =
|
|
8761
|
+
let o = bo(i, l);
|
|
8739
8762
|
t < s && i.push(0), u.push(i.concat(o));
|
|
8740
8763
|
}
|
|
8741
8764
|
let d = [];
|
|
@@ -8744,7 +8767,7 @@ function xo(e, t, n) {
|
|
|
8744
8767
|
});
|
|
8745
8768
|
return d;
|
|
8746
8769
|
}
|
|
8747
|
-
var
|
|
8770
|
+
var Co = class {
|
|
8748
8771
|
size;
|
|
8749
8772
|
modules;
|
|
8750
8773
|
isFunction;
|
|
@@ -8755,7 +8778,7 @@ var So = class {
|
|
|
8755
8778
|
this.modules[t][e] = n, this.isFunction[t][e] = !0;
|
|
8756
8779
|
}
|
|
8757
8780
|
};
|
|
8758
|
-
function
|
|
8781
|
+
function wo(e, t) {
|
|
8759
8782
|
let { size: n } = e;
|
|
8760
8783
|
for (let t = 0; t < n; t++) e.setFunction(6, t, t % 2 == 0), e.setFunction(t, 6, t % 2 == 0);
|
|
8761
8784
|
for (let [t, r] of [
|
|
@@ -8768,15 +8791,15 @@ function Co(e, t) {
|
|
|
8768
8791
|
let c = Math.max(Math.abs(a), Math.abs(i));
|
|
8769
8792
|
e.setFunction(o, s, c !== 2 && c !== 4);
|
|
8770
8793
|
}
|
|
8771
|
-
let r =
|
|
8794
|
+
let r = _o(t), i = r.length - 1;
|
|
8772
8795
|
r.forEach((t, n) => {
|
|
8773
8796
|
r.forEach((r, a) => {
|
|
8774
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);
|
|
8775
8798
|
});
|
|
8776
|
-
}),
|
|
8799
|
+
}), To(e, "M", 0), Eo(e, t);
|
|
8777
8800
|
}
|
|
8778
|
-
function
|
|
8779
|
-
let r =
|
|
8801
|
+
function To(e, t, n) {
|
|
8802
|
+
let r = fo[t] << 3 | n, i = r;
|
|
8780
8803
|
for (let e = 0; e < 10; e++) i = i << 1 ^ (i >>> 9) * 1335;
|
|
8781
8804
|
let a = (r << 10 | i) ^ 21522, o = (e) => (a >>> e & 1) != 0, { size: s } = e;
|
|
8782
8805
|
for (let t = 0; t <= 5; t++) e.setFunction(8, t, o(t));
|
|
@@ -8786,7 +8809,7 @@ function wo(e, t, n) {
|
|
|
8786
8809
|
for (let t = 8; t < 15; t++) e.setFunction(8, s - 15 + t, o(t));
|
|
8787
8810
|
e.setFunction(8, s - 8, !0);
|
|
8788
8811
|
}
|
|
8789
|
-
function
|
|
8812
|
+
function Eo(e, t) {
|
|
8790
8813
|
if (t < 7) return;
|
|
8791
8814
|
let n = t;
|
|
8792
8815
|
for (let e = 0; e < 12; e++) n = n << 1 ^ (n >>> 11) * 7973;
|
|
@@ -8796,7 +8819,7 @@ function To(e, t) {
|
|
|
8796
8819
|
e.setFunction(i, a, n), e.setFunction(a, i, n);
|
|
8797
8820
|
}
|
|
8798
8821
|
}
|
|
8799
|
-
function
|
|
8822
|
+
function Do(e, t) {
|
|
8800
8823
|
let { size: n } = e, r = 0;
|
|
8801
8824
|
for (let i = n - 1; i >= 1; i -= 2) {
|
|
8802
8825
|
i === 6 && (i = 5);
|
|
@@ -8810,7 +8833,7 @@ function Eo(e, t) {
|
|
|
8810
8833
|
}
|
|
8811
8834
|
}
|
|
8812
8835
|
}
|
|
8813
|
-
var
|
|
8836
|
+
var Oo = [
|
|
8814
8837
|
(e, t) => (e + t) % 2 == 0,
|
|
8815
8838
|
(e, t) => t % 2 == 0,
|
|
8816
8839
|
(e) => e % 3 == 0,
|
|
@@ -8820,10 +8843,10 @@ var Do = [
|
|
|
8820
8843
|
(e, t) => (e * t % 2 + e * t % 3) % 2 == 0,
|
|
8821
8844
|
(e, t) => ((e + t) % 2 + e * t % 3) % 2 == 0
|
|
8822
8845
|
];
|
|
8823
|
-
function
|
|
8824
|
-
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]);
|
|
8825
8848
|
}
|
|
8826
|
-
var
|
|
8849
|
+
var Ao = [[
|
|
8827
8850
|
!0,
|
|
8828
8851
|
!1,
|
|
8829
8852
|
!0,
|
|
@@ -8848,12 +8871,12 @@ var ko = [[
|
|
|
8848
8871
|
!1,
|
|
8849
8872
|
!0
|
|
8850
8873
|
]];
|
|
8851
|
-
function
|
|
8874
|
+
function jo(e) {
|
|
8852
8875
|
let t = e.length, n = (t, n, r) => r ? e[t][n] : e[n][t], r = 0;
|
|
8853
8876
|
for (let e of [!1, !0]) for (let i = 0; i < t; i++) {
|
|
8854
8877
|
let a = 1;
|
|
8855
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);
|
|
8856
|
-
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);
|
|
8857
8880
|
}
|
|
8858
8881
|
for (let n = 0; n < t - 1; n++) for (let i = 0; i < t - 1; i++) {
|
|
8859
8882
|
let t = e[n][i];
|
|
@@ -8862,20 +8885,20 @@ function Ao(e) {
|
|
|
8862
8885
|
let i = e.reduce((e, t) => e + t.filter(Boolean).length, 0) * 100 / (t * t);
|
|
8863
8886
|
return r += Math.floor(Math.abs(i - 50) / 5) * 10, r;
|
|
8864
8887
|
}
|
|
8865
|
-
function
|
|
8866
|
-
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`);
|
|
8867
8890
|
let n = new TextEncoder().encode(e), r = 1;
|
|
8868
|
-
for (; r <= 40 && !(4 + (r <= 9 ? 8 : 16) + n.length * 8 <=
|
|
8869
|
-
if (r > 40) throw new
|
|
8870
|
-
let i = xo(
|
|
8871
|
-
|
|
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);
|
|
8872
8895
|
let o = 0, s = Infinity;
|
|
8873
8896
|
for (let e = 0; e < 8; e++) {
|
|
8874
|
-
|
|
8875
|
-
let n =
|
|
8876
|
-
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);
|
|
8877
8900
|
}
|
|
8878
|
-
return
|
|
8901
|
+
return ko(a, o), To(a, t, o), {
|
|
8879
8902
|
size: a.size,
|
|
8880
8903
|
version: r,
|
|
8881
8904
|
modules: a.modules
|
|
@@ -8883,13 +8906,13 @@ function jo(e, t = "M") {
|
|
|
8883
8906
|
}
|
|
8884
8907
|
//#endregion
|
|
8885
8908
|
//#region src/components/ui/QrCode.tsx
|
|
8886
|
-
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 }) {
|
|
8887
8910
|
let s = p(() => {
|
|
8888
8911
|
if (!e) return null;
|
|
8889
8912
|
try {
|
|
8890
|
-
return
|
|
8913
|
+
return Mo(e, t);
|
|
8891
8914
|
} catch (e) {
|
|
8892
|
-
if (e instanceof
|
|
8915
|
+
if (e instanceof lo) return "too-long";
|
|
8893
8916
|
throw e;
|
|
8894
8917
|
}
|
|
8895
8918
|
}, [e, t]);
|
|
@@ -8923,7 +8946,7 @@ function Mo({ value: e, errorCorrection: t = "M", size: n = 160, margin: r = 4,
|
|
|
8923
8946
|
}
|
|
8924
8947
|
//#endregion
|
|
8925
8948
|
//#region src/components/ui/SearchInput.tsx
|
|
8926
|
-
function
|
|
8949
|
+
function Po({ value: e, onChange: t, placeholder: n = "Search...", className: r }) {
|
|
8927
8950
|
return /* @__PURE__ */ v("div", {
|
|
8928
8951
|
className: G("relative", r),
|
|
8929
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", {
|
|
@@ -8937,8 +8960,8 @@ function No({ value: e, onChange: t, placeholder: n = "Search...", className: r
|
|
|
8937
8960
|
}
|
|
8938
8961
|
//#endregion
|
|
8939
8962
|
//#region src/components/ui/Select.tsx
|
|
8940
|
-
var
|
|
8941
|
-
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({
|
|
8942
8965
|
id: i,
|
|
8943
8966
|
error: t,
|
|
8944
8967
|
hint: a,
|
|
@@ -8958,7 +8981,7 @@ var Po = a(({ label: e, error: t, options: n, className: r, id: i, hint: a, cont
|
|
|
8958
8981
|
className: "flex items-center justify-between",
|
|
8959
8982
|
children: [e && /* @__PURE__ */ _("label", {
|
|
8960
8983
|
htmlFor: p,
|
|
8961
|
-
className: "
|
|
8984
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
8962
8985
|
children: e
|
|
8963
8986
|
}), t && /* @__PURE__ */ _("p", {
|
|
8964
8987
|
id: m,
|
|
@@ -8986,10 +9009,10 @@ var Po = a(({ label: e, error: t, options: n, className: r, id: i, hint: a, cont
|
|
|
8986
9009
|
]
|
|
8987
9010
|
});
|
|
8988
9011
|
});
|
|
8989
|
-
|
|
9012
|
+
Fo.displayName = "Select";
|
|
8990
9013
|
//#endregion
|
|
8991
9014
|
//#region src/components/ui/SettingRow.tsx
|
|
8992
|
-
function
|
|
9015
|
+
function Io({ label: e, description: t, action: n, className: r }) {
|
|
8993
9016
|
return /* @__PURE__ */ v("div", {
|
|
8994
9017
|
className: G("border-border flex items-center justify-between border-b py-3", r),
|
|
8995
9018
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -9009,7 +9032,7 @@ function Fo({ label: e, description: t, action: n, className: r }) {
|
|
|
9009
9032
|
}
|
|
9010
9033
|
//#endregion
|
|
9011
9034
|
//#region src/components/ui/SideSheet.tsx
|
|
9012
|
-
function
|
|
9035
|
+
function Lo({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "right", widthClassName: o = "w-[360px]", className: s, contentClassName: c }) {
|
|
9013
9036
|
let u = an(), d = m(null);
|
|
9014
9037
|
return ft(d, e), l(() => {
|
|
9015
9038
|
if (!e) return;
|
|
@@ -9049,7 +9072,7 @@ function Io({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
|
|
|
9049
9072
|
})]
|
|
9050
9073
|
}),
|
|
9051
9074
|
/* @__PURE__ */ _("div", {
|
|
9052
|
-
className: G("flex-1 overflow-y-auto p-3", c),
|
|
9075
|
+
className: G("ui-surface-body flex-1 overflow-y-auto p-3", c),
|
|
9053
9076
|
children: r
|
|
9054
9077
|
}),
|
|
9055
9078
|
i && /* @__PURE__ */ _("div", {
|
|
@@ -9063,41 +9086,41 @@ function Io({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
|
|
|
9063
9086
|
}
|
|
9064
9087
|
//#endregion
|
|
9065
9088
|
//#region src/components/ui/SplitPaneLayout.tsx
|
|
9066
|
-
function
|
|
9089
|
+
function Ro({ children: e, direction: t = "row", className: n }) {
|
|
9067
9090
|
return /* @__PURE__ */ _("div", {
|
|
9068
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),
|
|
9069
9092
|
children: e
|
|
9070
9093
|
});
|
|
9071
9094
|
}
|
|
9072
|
-
function
|
|
9095
|
+
function zo({ children: e, className: t }) {
|
|
9073
9096
|
return /* @__PURE__ */ _("div", {
|
|
9074
9097
|
className: G("flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", t),
|
|
9075
9098
|
children: e
|
|
9076
9099
|
});
|
|
9077
9100
|
}
|
|
9078
|
-
var
|
|
9101
|
+
var Bo = Object.assign(Ro, { Main: zo }), Vo = {
|
|
9079
9102
|
active: "bg-green",
|
|
9080
9103
|
inactive: "bg-text-tertiary",
|
|
9081
9104
|
pending: "bg-yellow animate-pulse-subtle",
|
|
9082
9105
|
error: "bg-red"
|
|
9083
|
-
},
|
|
9106
|
+
}, Ho = {
|
|
9084
9107
|
active: "text-green",
|
|
9085
9108
|
inactive: "text-text-tertiary",
|
|
9086
9109
|
pending: "text-yellow",
|
|
9087
9110
|
error: "text-red"
|
|
9088
9111
|
};
|
|
9089
|
-
function
|
|
9112
|
+
function Uo({ status: e, label: t, className: n }) {
|
|
9090
9113
|
return /* @__PURE__ */ v("span", {
|
|
9091
9114
|
className: G("inline-flex items-center gap-1.5", n),
|
|
9092
|
-
children: [/* @__PURE__ */ _("span", { className: G("h-2 w-2 rounded-full",
|
|
9093
|
-
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]),
|
|
9094
9117
|
children: t
|
|
9095
9118
|
})]
|
|
9096
9119
|
});
|
|
9097
9120
|
}
|
|
9098
9121
|
//#endregion
|
|
9099
9122
|
//#region src/components/ui/StepProgress.tsx
|
|
9100
|
-
function
|
|
9123
|
+
function Wo({ steps: e, currentStep: t, className: n }) {
|
|
9101
9124
|
return /* @__PURE__ */ _("div", {
|
|
9102
9125
|
className: G("flex items-center justify-between", n),
|
|
9103
9126
|
children: e.map((n, r) => /* @__PURE__ */ v("div", {
|
|
@@ -9124,7 +9147,7 @@ function Uo({ steps: e, currentStep: t, className: n }) {
|
|
|
9124
9147
|
}
|
|
9125
9148
|
//#endregion
|
|
9126
9149
|
//#region src/components/ui/Tabs.tsx
|
|
9127
|
-
function
|
|
9150
|
+
function Go({ tabs: e, defaultTab: t, value: n, onChange: r, className: i }) {
|
|
9128
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);
|
|
9129
9152
|
function d(e) {
|
|
9130
9153
|
n === void 0 && o(e), r?.(e);
|
|
@@ -9163,8 +9186,8 @@ function Wo({ tabs: e, defaultTab: t, value: n, onChange: r, className: i }) {
|
|
|
9163
9186
|
}
|
|
9164
9187
|
//#endregion
|
|
9165
9188
|
//#region src/components/ui/Textarea.tsx
|
|
9166
|
-
var
|
|
9167
|
-
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({
|
|
9168
9191
|
id: o,
|
|
9169
9192
|
error: t,
|
|
9170
9193
|
hint: s,
|
|
@@ -9182,7 +9205,7 @@ var Go = a(({ label: e, error: t, showCount: n, maxLength: r, value: i, classNam
|
|
|
9182
9205
|
}),
|
|
9183
9206
|
e && /* @__PURE__ */ _("label", {
|
|
9184
9207
|
htmlFor: h,
|
|
9185
|
-
className: "
|
|
9208
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
9186
9209
|
children: e
|
|
9187
9210
|
}),
|
|
9188
9211
|
/* @__PURE__ */ _("textarea", {
|
|
@@ -9215,11 +9238,11 @@ var Go = a(({ label: e, error: t, showCount: n, maxLength: r, value: i, classNam
|
|
|
9215
9238
|
]
|
|
9216
9239
|
});
|
|
9217
9240
|
});
|
|
9218
|
-
|
|
9241
|
+
Ko.displayName = "Textarea";
|
|
9219
9242
|
//#endregion
|
|
9220
9243
|
//#region src/components/ui/TextInput.tsx
|
|
9221
|
-
var
|
|
9222
|
-
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({
|
|
9223
9246
|
id: i,
|
|
9224
9247
|
error: t,
|
|
9225
9248
|
hint: o,
|
|
@@ -9239,7 +9262,7 @@ var Ko = a(({ label: e, error: t, icon: n, className: r, id: i, readOnly: a, hin
|
|
|
9239
9262
|
className: "flex items-center justify-between",
|
|
9240
9263
|
children: [e && /* @__PURE__ */ _("label", {
|
|
9241
9264
|
htmlFor: m,
|
|
9242
|
-
className: "
|
|
9265
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
9243
9266
|
children: e
|
|
9244
9267
|
}), t && /* @__PURE__ */ _("p", {
|
|
9245
9268
|
id: h,
|
|
@@ -9268,10 +9291,10 @@ var Ko = a(({ label: e, error: t, icon: n, className: r, id: i, readOnly: a, hin
|
|
|
9268
9291
|
]
|
|
9269
9292
|
});
|
|
9270
9293
|
});
|
|
9271
|
-
|
|
9294
|
+
qo.displayName = "TextInput";
|
|
9272
9295
|
//#endregion
|
|
9273
9296
|
//#region src/components/ui/Timeline.tsx
|
|
9274
|
-
function
|
|
9297
|
+
function Jo({ items: e, className: t }) {
|
|
9275
9298
|
return /* @__PURE__ */ _("div", {
|
|
9276
9299
|
className: G("space-y-0", t),
|
|
9277
9300
|
children: e.map((t, n) => /* @__PURE__ */ v("div", {
|
|
@@ -9294,16 +9317,16 @@ function qo({ items: e, className: t }) {
|
|
|
9294
9317
|
}
|
|
9295
9318
|
//#endregion
|
|
9296
9319
|
//#region src/components/ui/Tooltip.tsx
|
|
9297
|
-
var
|
|
9320
|
+
var Yo = {
|
|
9298
9321
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
9299
9322
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
9300
9323
|
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
9301
9324
|
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
9302
9325
|
};
|
|
9303
|
-
function
|
|
9326
|
+
function Xo(e, t) {
|
|
9304
9327
|
return e ? `${e} ${t}` : t;
|
|
9305
9328
|
}
|
|
9306
|
-
function
|
|
9329
|
+
function Zo({ content: e, placement: t = "top", children: r }) {
|
|
9307
9330
|
let [i, a] = h(!1), s = u();
|
|
9308
9331
|
return /* @__PURE__ */ v("div", {
|
|
9309
9332
|
className: "relative inline-flex",
|
|
@@ -9311,9 +9334,9 @@ function Xo({ content: e, placement: t = "top", children: r }) {
|
|
|
9311
9334
|
onMouseLeave: () => a(!1),
|
|
9312
9335
|
onFocus: () => a(!0),
|
|
9313
9336
|
onBlur: () => a(!1),
|
|
9314
|
-
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", {
|
|
9315
9338
|
id: s,
|
|
9316
|
-
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]),
|
|
9317
9340
|
role: "tooltip",
|
|
9318
9341
|
children: e
|
|
9319
9342
|
})]
|
|
@@ -9321,7 +9344,7 @@ function Xo({ content: e, placement: t = "top", children: r }) {
|
|
|
9321
9344
|
}
|
|
9322
9345
|
//#endregion
|
|
9323
9346
|
//#region src/components/ui/Toolbar.tsx
|
|
9324
|
-
function
|
|
9347
|
+
function Qo({ start: e, end: t, children: n, className: r, startClassName: i, endClassName: a }) {
|
|
9325
9348
|
return /* @__PURE__ */ v("div", {
|
|
9326
9349
|
className: G("flex items-center justify-between gap-3", r),
|
|
9327
9350
|
children: [/* @__PURE__ */ _("div", {
|
|
@@ -9335,7 +9358,7 @@ function Zo({ start: e, end: t, children: n, className: r, startClassName: i, en
|
|
|
9335
9358
|
}
|
|
9336
9359
|
//#endregion
|
|
9337
9360
|
//#region src/components/ui/UploadDropzone.tsx
|
|
9338
|
-
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) {
|
|
9339
9362
|
let h = m(null);
|
|
9340
9363
|
d(p, () => h.current, []);
|
|
9341
9364
|
let g = u(), y = `${c ?? g}-description`;
|
|
@@ -9382,15 +9405,15 @@ var Qo = a(function({ title: e = "Drag and drop files here, or click to browse",
|
|
|
9382
9405
|
})
|
|
9383
9406
|
]
|
|
9384
9407
|
});
|
|
9385
|
-
}),
|
|
9408
|
+
}), es = r({ theme: "dark" });
|
|
9386
9409
|
//#endregion
|
|
9387
9410
|
//#region src/hooks/useTheme.ts
|
|
9388
|
-
function
|
|
9389
|
-
return c(
|
|
9411
|
+
function ts() {
|
|
9412
|
+
return c(es);
|
|
9390
9413
|
}
|
|
9391
9414
|
//#endregion
|
|
9392
9415
|
//#region src/lib/formatDate.ts
|
|
9393
|
-
var
|
|
9416
|
+
var ns = [
|
|
9394
9417
|
"Jan",
|
|
9395
9418
|
"Feb",
|
|
9396
9419
|
"Mar",
|
|
@@ -9404,21 +9427,21 @@ var ts = [
|
|
|
9404
9427
|
"Nov",
|
|
9405
9428
|
"Dec"
|
|
9406
9429
|
];
|
|
9407
|
-
function
|
|
9430
|
+
function rs(e) {
|
|
9408
9431
|
return (/* @__PURE__ */ new Date(e + "T00:00:00")).toLocaleDateString("en-US", {
|
|
9409
9432
|
month: "short",
|
|
9410
9433
|
day: "numeric",
|
|
9411
9434
|
year: "numeric"
|
|
9412
9435
|
});
|
|
9413
9436
|
}
|
|
9414
|
-
function
|
|
9437
|
+
function is(e) {
|
|
9415
9438
|
return (/* @__PURE__ */ new Date(e + "T00:00:00")).toLocaleDateString("en-US", {
|
|
9416
9439
|
month: "long",
|
|
9417
9440
|
day: "numeric",
|
|
9418
9441
|
year: "numeric"
|
|
9419
9442
|
});
|
|
9420
9443
|
}
|
|
9421
|
-
function
|
|
9444
|
+
function as(e, t = /* @__PURE__ */ new Date()) {
|
|
9422
9445
|
let n = t.getTime() - e.getTime(), r = Math.floor(n / 1e3);
|
|
9423
9446
|
if (r < 60) return "just now";
|
|
9424
9447
|
let i = Math.floor(r / 60);
|
|
@@ -9426,18 +9449,18 @@ function is(e, t = /* @__PURE__ */ new Date()) {
|
|
|
9426
9449
|
let a = Math.floor(i / 60);
|
|
9427
9450
|
if (a < 24) return `${a}h ago`;
|
|
9428
9451
|
if (Math.floor(a / 24) === 1) return "yesterday";
|
|
9429
|
-
let o = `${
|
|
9452
|
+
let o = `${ns[e.getMonth()]} ${e.getDate()}`;
|
|
9430
9453
|
return e.getFullYear() === t.getFullYear() ? o : `${o}, ${e.getFullYear()}`;
|
|
9431
9454
|
}
|
|
9432
9455
|
//#endregion
|
|
9433
9456
|
//#region src/providers/SettingsProvider.tsx
|
|
9434
|
-
var
|
|
9457
|
+
var os = {
|
|
9435
9458
|
"archivo-expanded": "\"Archivo\", \"Arial Black\", \"Avenir Next Condensed\", \"HelveticaNeue-CondensedBold\", system-ui, sans-serif",
|
|
9436
9459
|
inter: "\"Inter\", system-ui, -apple-system, BlinkMacSystemFont, sans-serif",
|
|
9437
9460
|
"jetbrains-mono": "\"JetBrains Mono\", Menlo, Monaco, Consolas, monospace",
|
|
9438
9461
|
"pt-serif": "\"PT Serif\", Georgia, ui-serif, Cambria, \"Times New Roman\", Times, serif",
|
|
9439
9462
|
system: "system-ui, -apple-system, BlinkMacSystemFont, sans-serif"
|
|
9440
|
-
},
|
|
9463
|
+
}, ss = {
|
|
9441
9464
|
purple: {
|
|
9442
9465
|
base: "#7C5CFC",
|
|
9443
9466
|
hover: "#6B4AEB",
|
|
@@ -9494,43 +9517,43 @@ var as = {
|
|
|
9494
9517
|
muted: "rgba(99,102,241,0.15)",
|
|
9495
9518
|
subtle: "rgba(99,102,241,0.08)"
|
|
9496
9519
|
}
|
|
9497
|
-
},
|
|
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([
|
|
9498
9521
|
"light",
|
|
9499
9522
|
"dark",
|
|
9500
9523
|
"system"
|
|
9501
9524
|
]);
|
|
9502
|
-
function
|
|
9525
|
+
function ps(e, t, n, r) {
|
|
9503
9526
|
return typeof e != "number" || !isFinite(e) ? r : Math.min(n, Math.max(t, e));
|
|
9504
9527
|
}
|
|
9505
|
-
function
|
|
9528
|
+
function ms(e) {
|
|
9506
9529
|
let t = {};
|
|
9507
|
-
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") {
|
|
9508
9531
|
let n = {};
|
|
9509
9532
|
for (let [t, r] of Object.entries(e.themeOverrides)) {
|
|
9510
|
-
if (!
|
|
9533
|
+
if (!us.has(t) || !r || typeof r != "object") continue;
|
|
9511
9534
|
let e = r, i = Ot[t];
|
|
9512
9535
|
n[t] = {
|
|
9513
|
-
uiFont:
|
|
9514
|
-
headingFont:
|
|
9515
|
-
proseFont:
|
|
9516
|
-
controlFont:
|
|
9517
|
-
labelFont:
|
|
9518
|
-
navigationFont:
|
|
9519
|
-
dataFont:
|
|
9520
|
-
codeFont:
|
|
9521
|
-
fontSize:
|
|
9522
|
-
borderRadius:
|
|
9523
|
-
borderWidth:
|
|
9524
|
-
tracking:
|
|
9525
|
-
lineHeight:
|
|
9526
|
-
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)
|
|
9527
9550
|
};
|
|
9528
9551
|
}
|
|
9529
9552
|
t.themeOverrides = n;
|
|
9530
9553
|
}
|
|
9531
9554
|
return t;
|
|
9532
9555
|
}
|
|
9533
|
-
var
|
|
9556
|
+
var hs = {
|
|
9534
9557
|
accentColor: "purple",
|
|
9535
9558
|
sidebarCollapsed: !1,
|
|
9536
9559
|
sidebarWidth: 220,
|
|
@@ -9540,35 +9563,35 @@ var ms = {
|
|
|
9540
9563
|
preferredLightTheme: "light",
|
|
9541
9564
|
themeOverrides: {}
|
|
9542
9565
|
};
|
|
9543
|
-
function
|
|
9566
|
+
function gs(e, t) {
|
|
9544
9567
|
let n = {
|
|
9545
|
-
...
|
|
9546
|
-
...
|
|
9568
|
+
...hs,
|
|
9569
|
+
...ms(t ?? {})
|
|
9547
9570
|
};
|
|
9548
9571
|
if (typeof localStorage > "u") return n;
|
|
9549
9572
|
try {
|
|
9550
9573
|
let t = localStorage.getItem(e);
|
|
9551
9574
|
if (t) return {
|
|
9552
9575
|
...n,
|
|
9553
|
-
...
|
|
9576
|
+
...ms(JSON.parse(t))
|
|
9554
9577
|
};
|
|
9555
9578
|
} catch (e) {
|
|
9556
9579
|
console.warn("[SettingsProvider] Failed to load settings:", e);
|
|
9557
9580
|
}
|
|
9558
9581
|
return n;
|
|
9559
9582
|
}
|
|
9560
|
-
function
|
|
9583
|
+
function _s(e, t) {
|
|
9561
9584
|
let n = Ot[e] ?? Ot.dark;
|
|
9562
9585
|
return t[e] ? {
|
|
9563
9586
|
...n,
|
|
9564
9587
|
...t[e]
|
|
9565
9588
|
} : n;
|
|
9566
9589
|
}
|
|
9567
|
-
function
|
|
9590
|
+
function vs(e, t) {
|
|
9568
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;
|
|
9569
9592
|
}
|
|
9570
|
-
function
|
|
9571
|
-
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);
|
|
9572
9595
|
l(() => {
|
|
9573
9596
|
if (typeof window > "u") return;
|
|
9574
9597
|
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e) => c(e.matches);
|
|
@@ -9580,9 +9603,9 @@ function vs({ children: e, storageKey: t = ss, initialSettings: n, forcedTheme:
|
|
|
9580
9603
|
i.preferredDarkTheme,
|
|
9581
9604
|
i.preferredLightTheme,
|
|
9582
9605
|
o
|
|
9583
|
-
]), [d, f] = h(() =>
|
|
9606
|
+
]), [d, f] = h(() => _s(u, i.themeOverrides));
|
|
9584
9607
|
l(() => {
|
|
9585
|
-
f(
|
|
9608
|
+
f(_s(u, i.themeOverrides));
|
|
9586
9609
|
}, [u]);
|
|
9587
9610
|
let m = s((e) => {
|
|
9588
9611
|
a((n) => {
|
|
@@ -9599,15 +9622,15 @@ function vs({ children: e, storageKey: t = ss, initialSettings: n, forcedTheme:
|
|
|
9599
9622
|
});
|
|
9600
9623
|
}, [t]);
|
|
9601
9624
|
l(() => {
|
|
9602
|
-
let e = document.documentElement, t =
|
|
9625
|
+
let e = document.documentElement, t = ss[i.accentColor];
|
|
9603
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);
|
|
9604
9627
|
}, [i.accentColor]), l(() => {
|
|
9605
9628
|
document.documentElement.classList.toggle("reduced-motion", i.reducedMotion);
|
|
9606
9629
|
}, [i.reducedMotion]), l(() => {
|
|
9607
9630
|
let e = document.documentElement, t = d.borderRadius;
|
|
9608
|
-
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`);
|
|
9609
9632
|
}, [d]);
|
|
9610
|
-
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(() => {
|
|
9611
9634
|
m({ themeOverrides: {
|
|
9612
9635
|
...i.themeOverrides,
|
|
9613
9636
|
[u]: { ...d }
|
|
@@ -9731,7 +9754,7 @@ function vs({ children: e, storageKey: t = ss, initialSettings: n, forcedTheme:
|
|
|
9731
9754
|
}
|
|
9732
9755
|
//#endregion
|
|
9733
9756
|
//#region src/providers/ThemeProvider.tsx
|
|
9734
|
-
var
|
|
9757
|
+
var bs = {
|
|
9735
9758
|
dark: "",
|
|
9736
9759
|
light: "theme-light",
|
|
9737
9760
|
lightInverted: "theme-light-inverted",
|
|
@@ -9741,23 +9764,23 @@ var ys = {
|
|
|
9741
9764
|
cyberBrutalLight: "theme-cyber-brutal-light",
|
|
9742
9765
|
hashiTheme: "theme-hashi"
|
|
9743
9766
|
};
|
|
9744
|
-
function
|
|
9767
|
+
function xs({ children: e }) {
|
|
9745
9768
|
let { resolvedTheme: t } = c(Mt);
|
|
9746
9769
|
return l(() => {
|
|
9747
9770
|
let e = document.documentElement;
|
|
9748
|
-
Object.values(
|
|
9771
|
+
Object.values(bs).forEach((t) => {
|
|
9749
9772
|
t && e.classList.remove(t);
|
|
9750
9773
|
});
|
|
9751
|
-
let n =
|
|
9774
|
+
let n = bs[t];
|
|
9752
9775
|
n && e.classList.add(n);
|
|
9753
|
-
}, [t]), /* @__PURE__ */ _(
|
|
9776
|
+
}, [t]), /* @__PURE__ */ _(es.Provider, {
|
|
9754
9777
|
value: { theme: t },
|
|
9755
9778
|
children: e
|
|
9756
9779
|
});
|
|
9757
9780
|
}
|
|
9758
9781
|
//#endregion
|
|
9759
9782
|
//#region src/components/ui/FormField.tsx
|
|
9760
|
-
function
|
|
9783
|
+
function Ss({ id: e, label: t, hint: n, error: r, required: i, optionalLabel: a, children: o, className: s, ...c }) {
|
|
9761
9784
|
let l = u(), d = e ?? l, f = n ? `${d}-hint` : void 0, p = r ? `${d}-error` : void 0, m = {
|
|
9762
9785
|
id: d,
|
|
9763
9786
|
"aria-describedby": Rn(f, p),
|
|
@@ -9777,7 +9800,7 @@ function xs({ id: e, label: t, hint: n, error: r, required: i, optionalLabel: a,
|
|
|
9777
9800
|
children: [
|
|
9778
9801
|
/* @__PURE__ */ v("label", {
|
|
9779
9802
|
htmlFor: d,
|
|
9780
|
-
className: "
|
|
9803
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
9781
9804
|
children: [
|
|
9782
9805
|
t,
|
|
9783
9806
|
i && /* @__PURE__ */ _("span", {
|
|
@@ -9802,13 +9825,13 @@ function xs({ id: e, label: t, hint: n, error: r, required: i, optionalLabel: a,
|
|
|
9802
9825
|
})
|
|
9803
9826
|
});
|
|
9804
9827
|
}
|
|
9805
|
-
function
|
|
9828
|
+
function Cs({ className: e, ...t }) {
|
|
9806
9829
|
return /* @__PURE__ */ _("p", {
|
|
9807
9830
|
...t,
|
|
9808
9831
|
className: G("text-text-secondary text-xs", e)
|
|
9809
9832
|
});
|
|
9810
9833
|
}
|
|
9811
|
-
function
|
|
9834
|
+
function ws({ className: e, ...t }) {
|
|
9812
9835
|
return /* @__PURE__ */ _("p", {
|
|
9813
9836
|
...t,
|
|
9814
9837
|
className: G("text-red text-xs", e)
|
|
@@ -9816,7 +9839,7 @@ function Cs({ className: e, ...t }) {
|
|
|
9816
9839
|
}
|
|
9817
9840
|
//#endregion
|
|
9818
9841
|
//#region src/components/ui/Fieldset.tsx
|
|
9819
|
-
function
|
|
9842
|
+
function Ts({ id: e, legend: t, hint: n, error: r, children: i, className: a, "aria-describedby": o, ...s }) {
|
|
9820
9843
|
let c = u(), l = e ?? c, d = n ? `${l}-hint` : void 0, f = r ? `${l}-error` : void 0, p = Rn(o, d, f);
|
|
9821
9844
|
return /* @__PURE__ */ v("fieldset", {
|
|
9822
9845
|
...s,
|
|
@@ -9850,7 +9873,7 @@ function ws({ id: e, legend: t, hint: n, error: r, children: i, className: a, "a
|
|
|
9850
9873
|
}
|
|
9851
9874
|
//#endregion
|
|
9852
9875
|
//#region src/components/ui/Radio.tsx
|
|
9853
|
-
var
|
|
9876
|
+
var Es = a(({ label: e, description: t, controlSize: n, className: r, id: i, "aria-describedby": a, "aria-invalid": o, ...s }, l) => {
|
|
9854
9877
|
let d = u(), f = an(n), p = c(Ln), m = i ?? p?.id ?? d, h = t ? `${m}-description` : void 0;
|
|
9855
9878
|
return /* @__PURE__ */ v("label", {
|
|
9856
9879
|
className: G("ui-choice flex items-start gap-2.5", r),
|
|
@@ -9873,14 +9896,14 @@ var Ts = a(({ label: e, description: t, controlSize: n, className: r, id: i, "ar
|
|
|
9873
9896
|
})]
|
|
9874
9897
|
});
|
|
9875
9898
|
});
|
|
9876
|
-
|
|
9877
|
-
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 }) {
|
|
9878
9901
|
let l = u(), d = t ?? l;
|
|
9879
|
-
return /* @__PURE__ */ _(
|
|
9902
|
+
return /* @__PURE__ */ _(Ts, {
|
|
9880
9903
|
...c,
|
|
9881
9904
|
id: d,
|
|
9882
9905
|
disabled: o,
|
|
9883
|
-
children: n.map((t, n) => /* @__PURE__ */ _(
|
|
9906
|
+
children: n.map((t, n) => /* @__PURE__ */ _(Es, {
|
|
9884
9907
|
id: `${d}-${n}`,
|
|
9885
9908
|
name: e ?? d,
|
|
9886
9909
|
value: t.value,
|
|
@@ -9894,17 +9917,17 @@ function Es({ name: e, id: t, options: n, value: r, onChange: i, required: a, di
|
|
|
9894
9917
|
}, t.value))
|
|
9895
9918
|
});
|
|
9896
9919
|
}
|
|
9897
|
-
var
|
|
9920
|
+
var Os = Object.assign(Es, { Group: Ds }), ks = {
|
|
9898
9921
|
pending: "Pending",
|
|
9899
9922
|
uploading: "Uploading",
|
|
9900
9923
|
processing: "Processing",
|
|
9901
9924
|
ready: "Ready",
|
|
9902
9925
|
error: "Upload failed"
|
|
9903
9926
|
};
|
|
9904
|
-
function
|
|
9927
|
+
function As(e) {
|
|
9905
9928
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
9906
9929
|
}
|
|
9907
|
-
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 }) {
|
|
9908
9931
|
return /* @__PURE__ */ v("li", {
|
|
9909
9932
|
...d,
|
|
9910
9933
|
className: G("ui-attachment-item border-border flex items-center justify-between gap-3 rounded-md border p-3", u),
|
|
@@ -9917,7 +9940,7 @@ function As({ name: e, size: t, status: n = "ready", statusLabel: r, error: i, o
|
|
|
9917
9940
|
}),
|
|
9918
9941
|
t !== void 0 && /* @__PURE__ */ _("p", {
|
|
9919
9942
|
className: "text-text-tertiary text-2xs",
|
|
9920
|
-
children:
|
|
9943
|
+
children: As(t)
|
|
9921
9944
|
}),
|
|
9922
9945
|
/* @__PURE__ */ v("div", {
|
|
9923
9946
|
role: "status",
|
|
@@ -9926,7 +9949,7 @@ function As({ name: e, size: t, status: n = "ready", statusLabel: r, error: i, o
|
|
|
9926
9949
|
children: [
|
|
9927
9950
|
e,
|
|
9928
9951
|
": ",
|
|
9929
|
-
i ?? r ??
|
|
9952
|
+
i ?? r ?? ks[n]
|
|
9930
9953
|
]
|
|
9931
9954
|
})
|
|
9932
9955
|
]
|
|
@@ -9968,7 +9991,7 @@ function As({ name: e, size: t, status: n = "ready", statusLabel: r, error: i, o
|
|
|
9968
9991
|
})]
|
|
9969
9992
|
});
|
|
9970
9993
|
}
|
|
9971
|
-
function
|
|
9994
|
+
function Ms({ children: e, className: t, "aria-label": n = "Attachments", ...r }) {
|
|
9972
9995
|
return /* @__PURE__ */ _("ul", {
|
|
9973
9996
|
...r,
|
|
9974
9997
|
"aria-label": n,
|
|
@@ -9978,7 +10001,7 @@ function js({ children: e, className: t, "aria-label": n = "Attachments", ...r }
|
|
|
9978
10001
|
}
|
|
9979
10002
|
//#endregion
|
|
9980
10003
|
//#region src/lib/dateParts.ts
|
|
9981
|
-
function
|
|
10004
|
+
function Ns(e, { required: t = !1, minYear: n = 1900, maxYear: r = 2100 } = {}) {
|
|
9982
10005
|
let i = [
|
|
9983
10006
|
e.day,
|
|
9984
10007
|
e.month,
|
|
@@ -10008,10 +10031,10 @@ function Ms(e, { required: t = !1, minYear: n = 1900, maxYear: r = 2100 } = {})
|
|
|
10008
10031
|
}
|
|
10009
10032
|
//#endregion
|
|
10010
10033
|
//#region src/components/ui/DatePartsInput.tsx
|
|
10011
|
-
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 }) {
|
|
10012
10035
|
let y = u(), b = m({}), [x, S] = h(!1);
|
|
10013
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");
|
|
10014
|
-
let C =
|
|
10037
|
+
let C = Ns(e, {
|
|
10015
10038
|
required: c,
|
|
10016
10039
|
minYear: p,
|
|
10017
10040
|
maxYear: g
|
|
@@ -10044,7 +10067,7 @@ function Ns({ value: e, onChange: t, label: n, hint: r, error: i, id: a, name: o
|
|
|
10044
10067
|
"aria-describedby": A,
|
|
10045
10068
|
children: [
|
|
10046
10069
|
/* @__PURE__ */ v("legend", {
|
|
10047
|
-
className: "
|
|
10070
|
+
className: "ui-field-label text-xs font-medium",
|
|
10048
10071
|
children: [n, c && /* @__PURE__ */ _("span", { children: " (required)" })]
|
|
10049
10072
|
}),
|
|
10050
10073
|
r && /* @__PURE__ */ _("p", {
|
|
@@ -10060,7 +10083,7 @@ function Ns({ value: e, onChange: t, label: n, hint: r, error: i, id: a, name: o
|
|
|
10060
10083
|
"year"
|
|
10061
10084
|
].map((n) => /* @__PURE__ */ v("div", {
|
|
10062
10085
|
className: "ui-date-part",
|
|
10063
|
-
children: [/* @__PURE__ */ _(
|
|
10086
|
+
children: [/* @__PURE__ */ _(qo, {
|
|
10064
10087
|
inputMode: "numeric",
|
|
10065
10088
|
"data-1p-ignore": "true",
|
|
10066
10089
|
...f?.[n],
|
|
@@ -10127,7 +10150,7 @@ function Ns({ value: e, onChange: t, label: n, hint: r, error: i, id: a, name: o
|
|
|
10127
10150
|
}
|
|
10128
10151
|
//#endregion
|
|
10129
10152
|
//#region src/components/ui/Skeleton.tsx
|
|
10130
|
-
function
|
|
10153
|
+
function Fs({ className: e, width: t, height: n, style: r, ...i }) {
|
|
10131
10154
|
return /* @__PURE__ */ _("div", {
|
|
10132
10155
|
...i,
|
|
10133
10156
|
"aria-hidden": "true",
|
|
@@ -10141,7 +10164,7 @@ function Ps({ className: e, width: t, height: n, style: r, ...i }) {
|
|
|
10141
10164
|
}
|
|
10142
10165
|
//#endregion
|
|
10143
10166
|
//#region src/components/ui/NavTabs.tsx
|
|
10144
|
-
function
|
|
10167
|
+
function Is({ items: e, activeKey: t, renderLink: n, className: r, "aria-label": i = "Sections", ...a }) {
|
|
10145
10168
|
return /* @__PURE__ */ _("nav", {
|
|
10146
10169
|
...a,
|
|
10147
10170
|
"aria-label": i,
|
|
@@ -10165,7 +10188,7 @@ function Fs({ items: e, activeKey: t, renderLink: n, className: r, "aria-label":
|
|
|
10165
10188
|
}
|
|
10166
10189
|
//#endregion
|
|
10167
10190
|
//#region src/components/ui/CharacterCount.tsx
|
|
10168
|
-
function
|
|
10191
|
+
function Ls({ value: e, maxLength: t, announcementDelay: n = 1e3, className: r, ...i }) {
|
|
10169
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);
|
|
10170
10193
|
return l(() => {
|
|
10171
10194
|
let e = setTimeout(() => u(s), n);
|
|
@@ -10187,7 +10210,7 @@ function Is({ value: e, maxLength: t, announcementDelay: n = 1e3, className: r,
|
|
|
10187
10210
|
}
|
|
10188
10211
|
//#endregion
|
|
10189
10212
|
//#region src/providers/ControlSizeProvider.tsx
|
|
10190
|
-
function
|
|
10213
|
+
function Rs({ size: e, children: t }) {
|
|
10191
10214
|
return /* @__PURE__ */ _(rn.Provider, {
|
|
10192
10215
|
value: e,
|
|
10193
10216
|
children: t
|
|
@@ -10195,7 +10218,7 @@ function Ls({ size: e, children: t }) {
|
|
|
10195
10218
|
}
|
|
10196
10219
|
//#endregion
|
|
10197
10220
|
//#region src/components/ui/ProgressBar.tsx
|
|
10198
|
-
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) {
|
|
10199
10222
|
let f = u(), p = s ?? f;
|
|
10200
10223
|
if (!Number.isFinite(n) || !Number.isFinite(r) || r <= n) throw RangeError("ProgressBar requires a finite max greater than min");
|
|
10201
10224
|
if (t !== void 0 && !Number.isFinite(t)) throw RangeError("ProgressBar value must be finite");
|
|
@@ -10232,4 +10255,4 @@ var Rs = a(function({ label: e, value: t, min: n = 0, max: r = 100, color: i = "
|
|
|
10232
10255
|
});
|
|
10233
10256
|
});
|
|
10234
10257
|
//#endregion
|
|
10235
|
-
export { qn as Alert, Pn as AppShell, He as AreaChart,
|
|
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 };
|