@leonardaustin/ui 0.5.1 → 0.6.1
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/Dialog.d.ts +7 -1
- package/dist/components/ui/Dialog.d.ts.map +1 -1
- package/dist/components/ui/SideSheet.d.ts.map +1 -1
- package/dist/config/theme.d.ts.map +1 -1
- package/dist/index.js +303 -210
- package/dist/lib/dialogDrag.d.ts +21 -0
- package/dist/lib/dialogDrag.d.ts.map +1 -0
- package/dist/providers/ThemeContext.d.ts +1 -1
- package/dist/providers/ThemeContext.d.ts.map +1 -1
- package/dist/providers/ThemeProvider.d.ts.map +1 -1
- package/dist/styles.css +110 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1799,6 +1799,15 @@ var xt = [
|
|
|
1799
1799
|
fg: "#d4d4d8"
|
|
1800
1800
|
}
|
|
1801
1801
|
},
|
|
1802
|
+
{
|
|
1803
|
+
value: "lightInverted",
|
|
1804
|
+
label: "Light Inverted",
|
|
1805
|
+
icon: oe,
|
|
1806
|
+
preview: {
|
|
1807
|
+
bg: "#f1f2f4",
|
|
1808
|
+
fg: "#ffffff"
|
|
1809
|
+
}
|
|
1810
|
+
},
|
|
1802
1811
|
{
|
|
1803
1812
|
value: "monokai",
|
|
1804
1813
|
label: "Monokai",
|
|
@@ -1846,6 +1855,7 @@ var xt = [
|
|
|
1846
1855
|
}
|
|
1847
1856
|
], St = new Set([
|
|
1848
1857
|
"light",
|
|
1858
|
+
"lightInverted",
|
|
1849
1859
|
"cyberBrutalLight",
|
|
1850
1860
|
"hashiTheme"
|
|
1851
1861
|
]);
|
|
@@ -1885,6 +1895,7 @@ var wt = xt.filter((e) => Ct(e.value)), Tt = xt.filter((e) => !Ct(e.value)), Et
|
|
|
1885
1895
|
}, Ot = {
|
|
1886
1896
|
dark: Et,
|
|
1887
1897
|
light: Et,
|
|
1898
|
+
lightInverted: Et,
|
|
1888
1899
|
monokai: Et,
|
|
1889
1900
|
solarized: Et,
|
|
1890
1901
|
cyberBrutalDark: Dt,
|
|
@@ -3413,13 +3424,13 @@ function Pn({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: i =
|
|
|
3413
3424
|
u(e), m(t);
|
|
3414
3425
|
}
|
|
3415
3426
|
return /* @__PURE__ */ h("div", {
|
|
3416
|
-
className: "border-border overflow-x-auto rounded-md border",
|
|
3427
|
+
className: "border-border bg-bg-table overflow-x-auto rounded-md border",
|
|
3417
3428
|
children: /* @__PURE__ */ g("table", {
|
|
3418
3429
|
className: "font-data w-full text-xs",
|
|
3419
3430
|
children: [/* @__PURE__ */ h("thead", { children: /* @__PURE__ */ h("tr", {
|
|
3420
|
-
className: "border-border bg-bg-
|
|
3431
|
+
className: "border-border bg-bg-table-header border-b",
|
|
3421
3432
|
children: t.map((e) => /* @__PURE__ */ h("th", {
|
|
3422
|
-
className: V("text-2xs text-text-
|
|
3433
|
+
className: V("text-2xs text-text-table-header font-label h-7 px-3 text-left font-semibold tracking-wider uppercase", e.sortable && "hover:text-text-table-header-hover cursor-pointer select-none"),
|
|
3423
3434
|
style: { width: e.width },
|
|
3424
3435
|
onClick: e.sortable ? () => S(e.key) : void 0,
|
|
3425
3436
|
children: /* @__PURE__ */ g("span", {
|
|
@@ -3432,7 +3443,7 @@ function Pn({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: i =
|
|
|
3432
3443
|
className: "text-text-tertiary h-32 text-center",
|
|
3433
3444
|
children: i
|
|
3434
3445
|
}) }) : b.map((e) => /* @__PURE__ */ h("tr", {
|
|
3435
|
-
className: V("border-border h-8 border-b last:border-b-0", "hover:bg-bg-hover", r && "cursor-pointer"),
|
|
3446
|
+
className: V("border-border h-8 border-b last:border-b-0", "hover:bg-bg-hover transition-none", r && "cursor-pointer"),
|
|
3436
3447
|
onClick: r ? () => r(e) : void 0,
|
|
3437
3448
|
children: t.map((t) => /* @__PURE__ */ h("td", {
|
|
3438
3449
|
className: V("text-text-primary px-3 whitespace-nowrap", t.cellClassName),
|
|
@@ -6805,11 +6816,97 @@ function ta({ open: e, onClose: t, title: n, children: r, className: i, resizabl
|
|
|
6805
6816
|
})
|
|
6806
6817
|
});
|
|
6807
6818
|
}
|
|
6819
|
+
function na(e, t, [n, r], [i, a], [o, s], c) {
|
|
6820
|
+
let [l, u] = r - n <= s - o - c * 2 ? [n, r] : [i, a], d = t + (o + c - l), f = t + (s - c - u);
|
|
6821
|
+
return f < d && (f = d), d = Math.min(d, 0), f = Math.max(f, 0), Math.min(f, Math.max(d, e));
|
|
6822
|
+
}
|
|
6823
|
+
function ra(e, t, n, r, i, a = 8) {
|
|
6824
|
+
return {
|
|
6825
|
+
x: na(e.x, t.x, [n.left, n.right], [r.left, r.right], [i.left, i.right], a),
|
|
6826
|
+
y: na(e.y, t.y, [n.top, n.bottom], [r.top, r.bottom], [i.top, i.bottom], a)
|
|
6827
|
+
};
|
|
6828
|
+
}
|
|
6829
|
+
function ia({ x: e, y: t }) {
|
|
6830
|
+
return e === 0 && t === 0 ? "" : `${e}px ${t}px`;
|
|
6831
|
+
}
|
|
6808
6832
|
//#endregion
|
|
6809
6833
|
//#region src/components/ui/Dialog.tsx
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6834
|
+
var aa = "(min-width: 48rem)", oa = "a[href], button, input, select, textarea, label, summary, [contenteditable]:not([contenteditable=\"false\"]), [role=\"button\"], [role=\"link\"], [tabindex]:not([tabindex=\"-1\"])", sa = {
|
|
6835
|
+
x: 0,
|
|
6836
|
+
y: 0
|
|
6837
|
+
};
|
|
6838
|
+
function ca(e) {
|
|
6839
|
+
let t = e.getBoundingClientRect();
|
|
6840
|
+
return {
|
|
6841
|
+
left: t.left,
|
|
6842
|
+
top: t.top,
|
|
6843
|
+
right: t.left + e.clientWidth,
|
|
6844
|
+
bottom: t.top + e.clientHeight
|
|
6845
|
+
};
|
|
6846
|
+
}
|
|
6847
|
+
function la(e) {
|
|
6848
|
+
return e.ownerDocument.defaultView?.matchMedia(aa).matches ?? !1;
|
|
6849
|
+
}
|
|
6850
|
+
function ua(e, t, n) {
|
|
6851
|
+
let r = f(sa), i = f(null);
|
|
6852
|
+
c(() => {
|
|
6853
|
+
let a = t.current, o = n.current, s = a?.ownerDocument.defaultView;
|
|
6854
|
+
if (!e || !a || !o || !s) return;
|
|
6855
|
+
let c = (e) => {
|
|
6856
|
+
r.current = e, a.style.translate = ia(e);
|
|
6857
|
+
}, l = () => {
|
|
6858
|
+
if (!la(a)) {
|
|
6859
|
+
i.current = null, c(sa);
|
|
6860
|
+
return;
|
|
6861
|
+
}
|
|
6862
|
+
let e = r.current, t = a.parentElement;
|
|
6863
|
+
e.x === 0 && e.y === 0 || !t || c(ra(e, e, a.getBoundingClientRect(), o.getBoundingClientRect(), ca(t)));
|
|
6864
|
+
};
|
|
6865
|
+
return s.addEventListener("resize", l), () => {
|
|
6866
|
+
s.removeEventListener("resize", l), i.current = null, r.current = sa, a.style.translate = "";
|
|
6867
|
+
};
|
|
6868
|
+
}, [
|
|
6869
|
+
e,
|
|
6870
|
+
t,
|
|
6871
|
+
n
|
|
6872
|
+
]);
|
|
6873
|
+
let a = (e) => {
|
|
6874
|
+
let n = t.current, a = e.currentTarget, o = n?.parentElement;
|
|
6875
|
+
if (!n || !o || e.button !== 0 || !e.isPrimary) return;
|
|
6876
|
+
let s = e.target.closest(oa);
|
|
6877
|
+
s && a.contains(s) || !la(n) || (e.preventDefault(), a.setPointerCapture(e.pointerId), i.current = {
|
|
6878
|
+
pointerId: e.pointerId,
|
|
6879
|
+
startX: e.clientX,
|
|
6880
|
+
startY: e.clientY,
|
|
6881
|
+
origin: r.current,
|
|
6882
|
+
dialog: n.getBoundingClientRect(),
|
|
6883
|
+
handle: a.getBoundingClientRect(),
|
|
6884
|
+
bounds: ca(o)
|
|
6885
|
+
});
|
|
6886
|
+
}, o = (e) => {
|
|
6887
|
+
let n = i.current, a = t.current;
|
|
6888
|
+
if (!n || n.pointerId !== e.pointerId || !a) return;
|
|
6889
|
+
let o = ra({
|
|
6890
|
+
x: n.origin.x + e.clientX - n.startX,
|
|
6891
|
+
y: n.origin.y + e.clientY - n.startY
|
|
6892
|
+
}, n.origin, n.dialog, n.handle, n.bounds);
|
|
6893
|
+
r.current = o, a.style.translate = ia(o);
|
|
6894
|
+
}, s = (e) => {
|
|
6895
|
+
i.current?.pointerId === e.pointerId && (i.current = null);
|
|
6896
|
+
};
|
|
6897
|
+
if (e) return {
|
|
6898
|
+
onPointerDown: a,
|
|
6899
|
+
onPointerMove: o,
|
|
6900
|
+
onPointerUp: s,
|
|
6901
|
+
onPointerCancel: s,
|
|
6902
|
+
onLostPointerCapture: s
|
|
6903
|
+
};
|
|
6904
|
+
}
|
|
6905
|
+
function da({ open: e, onClose: t, title: n, children: r, footer: i, className: a, draggable: o = !1 }) {
|
|
6906
|
+
let s = f(null), u = f(null), d = l();
|
|
6907
|
+
ft(s, e);
|
|
6908
|
+
let p = ua(e && o, s, u);
|
|
6909
|
+
return c(() => {
|
|
6813
6910
|
if (!e) return;
|
|
6814
6911
|
let n = (e) => {
|
|
6815
6912
|
e.key === "Escape" && t();
|
|
@@ -6823,17 +6920,19 @@ function na({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
6823
6920
|
className: "bg-bg-overlay fixed inset-0",
|
|
6824
6921
|
onClick: t
|
|
6825
6922
|
}), /* @__PURE__ */ g("div", {
|
|
6826
|
-
ref:
|
|
6923
|
+
ref: s,
|
|
6827
6924
|
className: V("relative z-50 mx-4 mb-8 w-full max-w-[400px] p-6", "bg-bg-secondary border-border rounded-lg border", "animate-scale-in shadow-lg", a),
|
|
6828
6925
|
role: "dialog",
|
|
6829
6926
|
"aria-modal": "true",
|
|
6830
|
-
"aria-labelledby": n ?
|
|
6927
|
+
"aria-labelledby": n ? d : void 0,
|
|
6831
6928
|
"aria-label": n ? void 0 : "Dialog",
|
|
6832
6929
|
children: [
|
|
6833
6930
|
/* @__PURE__ */ g("div", {
|
|
6834
|
-
|
|
6931
|
+
ref: u,
|
|
6932
|
+
className: V("mb-4 flex items-center justify-between", o && "md:cursor-grab md:touch-none md:select-none md:active:cursor-grabbing"),
|
|
6933
|
+
...p,
|
|
6835
6934
|
children: [n && /* @__PURE__ */ h("h3", {
|
|
6836
|
-
id:
|
|
6935
|
+
id: d,
|
|
6837
6936
|
className: "text-text-primary text-sm font-semibold",
|
|
6838
6937
|
children: n
|
|
6839
6938
|
}), /* @__PURE__ */ h("button", {
|
|
@@ -6851,7 +6950,7 @@ function na({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
6851
6950
|
}
|
|
6852
6951
|
//#endregion
|
|
6853
6952
|
//#region src/components/ui/DialogActions.tsx
|
|
6854
|
-
function
|
|
6953
|
+
function fa({ onCancel: e, onConfirm: t, cancelLabel: n = "Cancel", confirmLabel: r = "Confirm", confirmVariant: i = "primary", className: a }) {
|
|
6855
6954
|
return /* @__PURE__ */ g("div", {
|
|
6856
6955
|
className: V("flex justify-end gap-2", a),
|
|
6857
6956
|
children: [/* @__PURE__ */ h(un, {
|
|
@@ -6869,7 +6968,7 @@ function ra({ onCancel: e, onConfirm: t, cancelLabel: n = "Cancel", confirmLabel
|
|
|
6869
6968
|
}
|
|
6870
6969
|
//#endregion
|
|
6871
6970
|
//#region src/components/ui/DividerLabel.tsx
|
|
6872
|
-
function
|
|
6971
|
+
function pa({ children: e, className: t }) {
|
|
6873
6972
|
return /* @__PURE__ */ g("div", {
|
|
6874
6973
|
className: V("my-6 flex items-center gap-3", t),
|
|
6875
6974
|
children: [
|
|
@@ -6884,7 +6983,7 @@ function ia({ children: e, className: t }) {
|
|
|
6884
6983
|
}
|
|
6885
6984
|
//#endregion
|
|
6886
6985
|
//#region src/components/ui/DropdownMenu.tsx
|
|
6887
|
-
function
|
|
6986
|
+
function ma({ trigger: e, items: t, align: n = "right" }) {
|
|
6888
6987
|
let [r, i] = p(!1), [a, s] = p({
|
|
6889
6988
|
top: 0,
|
|
6890
6989
|
left: 0,
|
|
@@ -6965,7 +7064,7 @@ function aa({ trigger: e, items: t, align: n = "right" }) {
|
|
|
6965
7064
|
}
|
|
6966
7065
|
//#endregion
|
|
6967
7066
|
//#region src/components/ui/EmptyState.tsx
|
|
6968
|
-
function
|
|
7067
|
+
function ha({ icon: e, title: t, description: n, action: r, className: i }) {
|
|
6969
7068
|
return /* @__PURE__ */ g("div", {
|
|
6970
7069
|
className: V("flex flex-col items-center justify-center px-4 py-12", i),
|
|
6971
7070
|
children: [
|
|
@@ -6990,7 +7089,7 @@ function oa({ icon: e, title: t, description: n, action: r, className: i }) {
|
|
|
6990
7089
|
}
|
|
6991
7090
|
//#endregion
|
|
6992
7091
|
//#region src/components/ui/ErrorBoundary.tsx
|
|
6993
|
-
var
|
|
7092
|
+
var ga = class extends e {
|
|
6994
7093
|
state = {
|
|
6995
7094
|
hasError: !1,
|
|
6996
7095
|
error: null
|
|
@@ -7032,8 +7131,8 @@ var sa = class extends e {
|
|
|
7032
7131
|
};
|
|
7033
7132
|
//#endregion
|
|
7034
7133
|
//#region src/components/ui/FilterDropdown.tsx
|
|
7035
|
-
function
|
|
7036
|
-
return /* @__PURE__ */ h(
|
|
7134
|
+
function _a({ icon: e, children: t, items: n, align: r, className: i }) {
|
|
7135
|
+
return /* @__PURE__ */ h(ma, {
|
|
7037
7136
|
align: r,
|
|
7038
7137
|
trigger: /* @__PURE__ */ h(An, {
|
|
7039
7138
|
icon: e,
|
|
@@ -7045,7 +7144,7 @@ function ca({ icon: e, children: t, items: n, align: r, className: i }) {
|
|
|
7045
7144
|
}
|
|
7046
7145
|
//#endregion
|
|
7047
7146
|
//#region src/components/ui/Kbd.tsx
|
|
7048
|
-
function
|
|
7147
|
+
function va({ children: e, className: t }) {
|
|
7049
7148
|
return /* @__PURE__ */ h("kbd", {
|
|
7050
7149
|
className: V("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),
|
|
7051
7150
|
children: e
|
|
@@ -7053,20 +7152,20 @@ function la({ children: e, className: t }) {
|
|
|
7053
7152
|
}
|
|
7054
7153
|
//#endregion
|
|
7055
7154
|
//#region src/components/ui/LoadingSpinner.tsx
|
|
7056
|
-
var
|
|
7155
|
+
var ya = {
|
|
7057
7156
|
sm: "w-4 h-4",
|
|
7058
7157
|
md: "w-6 h-6",
|
|
7059
7158
|
lg: "w-8 h-8"
|
|
7060
7159
|
};
|
|
7061
|
-
function
|
|
7160
|
+
function ba({ className: e, size: t = "md" }) {
|
|
7062
7161
|
return /* @__PURE__ */ h("div", {
|
|
7063
7162
|
className: V("flex min-h-[200px] items-center justify-center", e),
|
|
7064
|
-
children: /* @__PURE__ */ h(F, { className: V("text-accent animate-spin",
|
|
7163
|
+
children: /* @__PURE__ */ h(F, { className: V("text-accent animate-spin", ya[t]) })
|
|
7065
7164
|
});
|
|
7066
7165
|
}
|
|
7067
7166
|
//#endregion
|
|
7068
7167
|
//#region src/components/ui/MetadataGrid.tsx
|
|
7069
|
-
function
|
|
7168
|
+
function xa({ items: e, labelWidth: n = "100px", className: r }) {
|
|
7070
7169
|
return /* @__PURE__ */ h("div", {
|
|
7071
7170
|
className: V("gap-x-3 gap-y-2 text-xs", r),
|
|
7072
7171
|
style: {
|
|
@@ -7084,7 +7183,7 @@ function fa({ items: e, labelWidth: n = "100px", className: r }) {
|
|
|
7084
7183
|
}
|
|
7085
7184
|
//#endregion
|
|
7086
7185
|
//#region src/components/ui/MetricCard.tsx
|
|
7087
|
-
function
|
|
7186
|
+
function Sa({ label: e, value: t, sub: n, trend: r, bar: i, icon: a, iconColor: o, className: s }) {
|
|
7088
7187
|
let c = r?.tone === "positive" ? "text-green" : r?.tone === "negative" ? "text-red" : "text-text-tertiary";
|
|
7089
7188
|
return /* @__PURE__ */ g("div", {
|
|
7090
7189
|
className: V("bg-bg-secondary border-border relative overflow-hidden rounded-md border p-3", s),
|
|
@@ -7124,7 +7223,7 @@ function pa({ label: e, value: t, sub: n, trend: r, bar: i, icon: a, iconColor:
|
|
|
7124
7223
|
}
|
|
7125
7224
|
//#endregion
|
|
7126
7225
|
//#region src/components/ui/OAuthButton.tsx
|
|
7127
|
-
function
|
|
7226
|
+
function Ca() {
|
|
7128
7227
|
return /* @__PURE__ */ g("svg", {
|
|
7129
7228
|
className: "h-3.5 w-3.5",
|
|
7130
7229
|
viewBox: "0 0 24 24",
|
|
@@ -7149,7 +7248,7 @@ function ma() {
|
|
|
7149
7248
|
]
|
|
7150
7249
|
});
|
|
7151
7250
|
}
|
|
7152
|
-
function
|
|
7251
|
+
function wa() {
|
|
7153
7252
|
return /* @__PURE__ */ h("svg", {
|
|
7154
7253
|
className: "h-3.5 w-3.5",
|
|
7155
7254
|
viewBox: "0 0 24 24",
|
|
@@ -7158,25 +7257,25 @@ function ha() {
|
|
|
7158
7257
|
children: /* @__PURE__ */ h("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" })
|
|
7159
7258
|
});
|
|
7160
7259
|
}
|
|
7161
|
-
var
|
|
7260
|
+
var Ta = {
|
|
7162
7261
|
github: "GitHub",
|
|
7163
7262
|
google: "Google"
|
|
7164
|
-
},
|
|
7165
|
-
github:
|
|
7166
|
-
google:
|
|
7263
|
+
}, Ea = {
|
|
7264
|
+
github: wa,
|
|
7265
|
+
google: Ca
|
|
7167
7266
|
};
|
|
7168
|
-
function
|
|
7169
|
-
let r =
|
|
7267
|
+
function Da({ provider: e, children: t, ...n }) {
|
|
7268
|
+
let r = Ea[e];
|
|
7170
7269
|
return /* @__PURE__ */ g(un, {
|
|
7171
7270
|
variant: "secondary",
|
|
7172
7271
|
size: "md",
|
|
7173
7272
|
...n,
|
|
7174
|
-
children: [/* @__PURE__ */ h(r, {}), t ??
|
|
7273
|
+
children: [/* @__PURE__ */ h(r, {}), t ?? Ta[e]]
|
|
7175
7274
|
});
|
|
7176
7275
|
}
|
|
7177
7276
|
//#endregion
|
|
7178
7277
|
//#region src/components/ui/PageHeader.tsx
|
|
7179
|
-
function
|
|
7278
|
+
function Oa({ title: e, subtitle: t, actions: n, className: r }) {
|
|
7180
7279
|
return /* @__PURE__ */ g("div", {
|
|
7181
7280
|
className: V("flex items-center justify-between", r),
|
|
7182
7281
|
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
|
|
@@ -7193,7 +7292,7 @@ function ya({ title: e, subtitle: t, actions: n, className: r }) {
|
|
|
7193
7292
|
}
|
|
7194
7293
|
//#endregion
|
|
7195
7294
|
//#region src/components/ui/PageSection.tsx
|
|
7196
|
-
function
|
|
7295
|
+
function ka({ title: e, description: t, actions: n, children: r, as: i = "h2", className: a, headerClassName: o, contentClassName: s }) {
|
|
7197
7296
|
return /* @__PURE__ */ g("section", {
|
|
7198
7297
|
className: V("space-y-4", a),
|
|
7199
7298
|
children: [(e || t || n) && /* @__PURE__ */ g("div", {
|
|
@@ -7219,7 +7318,7 @@ function ba({ title: e, description: t, actions: n, children: r, as: i = "h2", c
|
|
|
7219
7318
|
}
|
|
7220
7319
|
//#endregion
|
|
7221
7320
|
//#region src/components/ui/PaginationBar.tsx
|
|
7222
|
-
var
|
|
7321
|
+
var Aa = [
|
|
7223
7322
|
{
|
|
7224
7323
|
value: "10",
|
|
7225
7324
|
label: "10 per page"
|
|
@@ -7233,7 +7332,7 @@ var xa = [
|
|
|
7233
7332
|
label: "50 per page"
|
|
7234
7333
|
}
|
|
7235
7334
|
];
|
|
7236
|
-
function
|
|
7335
|
+
function ja({ page: e, pageSize: t, total: n, pageSizeOptions: r = Aa, onPageChange: i, onPageSizeChange: a, className: o }) {
|
|
7237
7336
|
let s = Math.ceil(n / t), c = Math.min((e - 1) * t + 1, n), l = Math.min(e * t, n);
|
|
7238
7337
|
return /* @__PURE__ */ g("div", {
|
|
7239
7338
|
className: V("flex items-center justify-between", o),
|
|
@@ -7264,7 +7363,7 @@ function Sa({ page: e, pageSize: t, total: n, pageSizeOptions: r = xa, onPageCha
|
|
|
7264
7363
|
}
|
|
7265
7364
|
//#endregion
|
|
7266
7365
|
//#region src/components/ui/PasswordInput.tsx
|
|
7267
|
-
var
|
|
7366
|
+
var Ma = i(({ label: e, error: t, className: n, id: r, ...i }, a) => {
|
|
7268
7367
|
let o = r || e?.toLowerCase().replace(/\s+/g, "-"), [s, c] = p(!1);
|
|
7269
7368
|
return /* @__PURE__ */ g("div", {
|
|
7270
7369
|
className: "flex flex-col gap-1.5",
|
|
@@ -7296,8 +7395,8 @@ var Ca = i(({ label: e, error: t, className: n, id: r, ...i }, a) => {
|
|
|
7296
7395
|
})]
|
|
7297
7396
|
});
|
|
7298
7397
|
});
|
|
7299
|
-
|
|
7300
|
-
var
|
|
7398
|
+
Ma.displayName = "PasswordInput";
|
|
7399
|
+
var Na = Object.freeze([
|
|
7301
7400
|
{
|
|
7302
7401
|
label: "At least 8 characters",
|
|
7303
7402
|
test: (e) => e.length >= 8
|
|
@@ -7315,12 +7414,12 @@ var wa = Object.freeze([
|
|
|
7315
7414
|
test: (e) => /\d/.test(e)
|
|
7316
7415
|
}
|
|
7317
7416
|
]);
|
|
7318
|
-
function
|
|
7417
|
+
function Pa(e, t = Na) {
|
|
7319
7418
|
return t.every((t) => t.test(e));
|
|
7320
7419
|
}
|
|
7321
7420
|
//#endregion
|
|
7322
7421
|
//#region src/components/ui/PasswordRequirements.tsx
|
|
7323
|
-
function
|
|
7422
|
+
function Fa({ password: e, requirements: t = Na, showWhenEmpty: n = !1, className: r }) {
|
|
7324
7423
|
return !n && e.length === 0 ? null : /* @__PURE__ */ h("ul", {
|
|
7325
7424
|
"aria-label": "Password requirements",
|
|
7326
7425
|
className: V("space-y-1", r),
|
|
@@ -7347,7 +7446,7 @@ function Ea({ password: e, requirements: t = wa, showWhenEmpty: n = !1, classNam
|
|
|
7347
7446
|
}
|
|
7348
7447
|
//#endregion
|
|
7349
7448
|
//#region src/components/ui/ProfileHeader.tsx
|
|
7350
|
-
function
|
|
7449
|
+
function Ia({ name: e, subtitle: t, badge: n, meta: r, action: i, className: a }) {
|
|
7351
7450
|
return /* @__PURE__ */ g("div", {
|
|
7352
7451
|
className: V("flex items-start gap-4", a),
|
|
7353
7452
|
children: [
|
|
@@ -7395,7 +7494,7 @@ function Da({ name: e, subtitle: t, badge: n, meta: r, action: i, className: a }
|
|
|
7395
7494
|
}
|
|
7396
7495
|
//#endregion
|
|
7397
7496
|
//#region src/components/ui/ProseContent.tsx
|
|
7398
|
-
function
|
|
7497
|
+
function La({ children: e, className: t }) {
|
|
7399
7498
|
return /* @__PURE__ */ h("div", {
|
|
7400
7499
|
className: V("ui-prose", t),
|
|
7401
7500
|
children: e
|
|
@@ -7403,21 +7502,21 @@ function Oa({ children: e, className: t }) {
|
|
|
7403
7502
|
}
|
|
7404
7503
|
//#endregion
|
|
7405
7504
|
//#region src/lib/qrCode.ts
|
|
7406
|
-
var
|
|
7505
|
+
var Ra = class extends RangeError {
|
|
7407
7506
|
constructor() {
|
|
7408
7507
|
super("Text is too long to encode as a QR code"), this.name = "QrCapacityError";
|
|
7409
7508
|
}
|
|
7410
|
-
},
|
|
7509
|
+
}, za = {
|
|
7411
7510
|
L: 0,
|
|
7412
7511
|
M: 1,
|
|
7413
7512
|
Q: 2,
|
|
7414
7513
|
H: 3
|
|
7415
|
-
},
|
|
7514
|
+
}, Ba = {
|
|
7416
7515
|
L: 1,
|
|
7417
7516
|
M: 0,
|
|
7418
7517
|
Q: 3,
|
|
7419
7518
|
H: 2
|
|
7420
|
-
},
|
|
7519
|
+
}, Va = [
|
|
7421
7520
|
[
|
|
7422
7521
|
-1,
|
|
7423
7522
|
7,
|
|
@@ -7590,7 +7689,7 @@ var ka = class extends RangeError {
|
|
|
7590
7689
|
30,
|
|
7591
7690
|
30
|
|
7592
7691
|
]
|
|
7593
|
-
],
|
|
7692
|
+
], Ha = [
|
|
7594
7693
|
[
|
|
7595
7694
|
-1,
|
|
7596
7695
|
1,
|
|
@@ -7764,7 +7863,7 @@ var ka = class extends RangeError {
|
|
|
7764
7863
|
81
|
|
7765
7864
|
]
|
|
7766
7865
|
];
|
|
7767
|
-
function
|
|
7866
|
+
function Ua(e) {
|
|
7768
7867
|
let t = (16 * e + 128) * e + 64;
|
|
7769
7868
|
if (e >= 2) {
|
|
7770
7869
|
let n = Math.floor(e / 7) + 2;
|
|
@@ -7772,43 +7871,43 @@ function Pa(e) {
|
|
|
7772
7871
|
}
|
|
7773
7872
|
return t;
|
|
7774
7873
|
}
|
|
7775
|
-
function
|
|
7776
|
-
let n =
|
|
7777
|
-
return Math.floor(
|
|
7874
|
+
function Wa(e, t) {
|
|
7875
|
+
let n = za[t];
|
|
7876
|
+
return Math.floor(Ua(e) / 8) - Va[n][e] * Ha[n][e];
|
|
7778
7877
|
}
|
|
7779
|
-
function
|
|
7878
|
+
function Ga(e) {
|
|
7780
7879
|
if (e === 1) return [];
|
|
7781
7880
|
let t = Math.floor(e / 7) + 2, n = Math.floor((e * 8 + t * 3 + 5) / (t * 4 - 4)) * 2, r = [6];
|
|
7782
7881
|
for (let i = e * 4 + 17 - 7; r.length < t; i -= n) r.splice(1, 0, i);
|
|
7783
7882
|
return r;
|
|
7784
7883
|
}
|
|
7785
|
-
function
|
|
7884
|
+
function Ka(e, t) {
|
|
7786
7885
|
let n = 0;
|
|
7787
7886
|
for (let r = 7; r >= 0; r--) n = n << 1 ^ (n >>> 7) * 285, n ^= (t >>> r & 1) * e;
|
|
7788
7887
|
return n;
|
|
7789
7888
|
}
|
|
7790
|
-
function
|
|
7889
|
+
function qa(e) {
|
|
7791
7890
|
let t = Array(e).fill(0);
|
|
7792
7891
|
t[e - 1] = 1;
|
|
7793
7892
|
let n = 1;
|
|
7794
7893
|
for (let r = 0; r < e; r++) {
|
|
7795
|
-
for (let e = 0; e < t.length; e++) t[e] =
|
|
7796
|
-
n =
|
|
7894
|
+
for (let e = 0; e < t.length; e++) t[e] = Ka(t[e], n), e + 1 < t.length && (t[e] ^= t[e + 1]);
|
|
7895
|
+
n = Ka(n, 2);
|
|
7797
7896
|
}
|
|
7798
7897
|
return t;
|
|
7799
7898
|
}
|
|
7800
|
-
function
|
|
7899
|
+
function Ja(e, t) {
|
|
7801
7900
|
let n = Array(t.length).fill(0);
|
|
7802
7901
|
for (let r of e) {
|
|
7803
7902
|
let e = r ^ n.shift();
|
|
7804
7903
|
n.push(0), t.forEach((t, r) => {
|
|
7805
|
-
n[r] ^=
|
|
7904
|
+
n[r] ^= Ka(t, e);
|
|
7806
7905
|
});
|
|
7807
7906
|
}
|
|
7808
7907
|
return n;
|
|
7809
7908
|
}
|
|
7810
|
-
function
|
|
7811
|
-
let r =
|
|
7909
|
+
function Ya(e, t, n) {
|
|
7910
|
+
let r = Wa(t, n) * 8, i = [], a = (e, t) => {
|
|
7812
7911
|
for (let n = t - 1; n >= 0; n--) i.push(e >>> n & 1);
|
|
7813
7912
|
};
|
|
7814
7913
|
a(4, 4), a(e.length, t <= 9 ? 8 : 16);
|
|
@@ -7819,12 +7918,12 @@ function Ba(e, t, n) {
|
|
|
7819
7918
|
for (let e = 0; e < i.length; e += 8) o.push(i.slice(e, e + 8).reduce((e, t) => e << 1 | t));
|
|
7820
7919
|
return o;
|
|
7821
7920
|
}
|
|
7822
|
-
function
|
|
7823
|
-
let r =
|
|
7921
|
+
function Xa(e, t, n) {
|
|
7922
|
+
let r = za[n], i = Ha[r][t], a = Va[r][t], o = Math.floor(Ua(t) / 8), s = i - o % i, c = Math.floor(o / i), l = qa(a), u = [];
|
|
7824
7923
|
for (let t = 0, n = 0; t < i; t++) {
|
|
7825
7924
|
let r = c - a + (t < s ? 0 : 1), i = e.slice(n, n + r);
|
|
7826
7925
|
n += r;
|
|
7827
|
-
let o =
|
|
7926
|
+
let o = Ja(i, l);
|
|
7828
7927
|
t < s && i.push(0), u.push(i.concat(o));
|
|
7829
7928
|
}
|
|
7830
7929
|
let d = [];
|
|
@@ -7833,7 +7932,7 @@ function Va(e, t, n) {
|
|
|
7833
7932
|
});
|
|
7834
7933
|
return d;
|
|
7835
7934
|
}
|
|
7836
|
-
var
|
|
7935
|
+
var Za = class {
|
|
7837
7936
|
size;
|
|
7838
7937
|
modules;
|
|
7839
7938
|
isFunction;
|
|
@@ -7844,7 +7943,7 @@ var Ha = class {
|
|
|
7844
7943
|
this.modules[t][e] = n, this.isFunction[t][e] = !0;
|
|
7845
7944
|
}
|
|
7846
7945
|
};
|
|
7847
|
-
function
|
|
7946
|
+
function Qa(e, t) {
|
|
7848
7947
|
let { size: n } = e;
|
|
7849
7948
|
for (let t = 0; t < n; t++) e.setFunction(6, t, t % 2 == 0), e.setFunction(t, 6, t % 2 == 0);
|
|
7850
7949
|
for (let [t, r] of [
|
|
@@ -7857,15 +7956,15 @@ function Ua(e, t) {
|
|
|
7857
7956
|
let c = Math.max(Math.abs(a), Math.abs(i));
|
|
7858
7957
|
e.setFunction(o, s, c !== 2 && c !== 4);
|
|
7859
7958
|
}
|
|
7860
|
-
let r =
|
|
7959
|
+
let r = Ga(t), i = r.length - 1;
|
|
7861
7960
|
r.forEach((t, n) => {
|
|
7862
7961
|
r.forEach((r, a) => {
|
|
7863
7962
|
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);
|
|
7864
7963
|
});
|
|
7865
|
-
}),
|
|
7964
|
+
}), $a(e, "M", 0), eo(e, t);
|
|
7866
7965
|
}
|
|
7867
|
-
function
|
|
7868
|
-
let r =
|
|
7966
|
+
function $a(e, t, n) {
|
|
7967
|
+
let r = Ba[t] << 3 | n, i = r;
|
|
7869
7968
|
for (let e = 0; e < 10; e++) i = i << 1 ^ (i >>> 9) * 1335;
|
|
7870
7969
|
let a = (r << 10 | i) ^ 21522, o = (e) => (a >>> e & 1) != 0, { size: s } = e;
|
|
7871
7970
|
for (let t = 0; t <= 5; t++) e.setFunction(8, t, o(t));
|
|
@@ -7875,7 +7974,7 @@ function Wa(e, t, n) {
|
|
|
7875
7974
|
for (let t = 8; t < 15; t++) e.setFunction(8, s - 15 + t, o(t));
|
|
7876
7975
|
e.setFunction(8, s - 8, !0);
|
|
7877
7976
|
}
|
|
7878
|
-
function
|
|
7977
|
+
function eo(e, t) {
|
|
7879
7978
|
if (t < 7) return;
|
|
7880
7979
|
let n = t;
|
|
7881
7980
|
for (let e = 0; e < 12; e++) n = n << 1 ^ (n >>> 11) * 7973;
|
|
@@ -7885,7 +7984,7 @@ function Ga(e, t) {
|
|
|
7885
7984
|
e.setFunction(i, a, n), e.setFunction(a, i, n);
|
|
7886
7985
|
}
|
|
7887
7986
|
}
|
|
7888
|
-
function
|
|
7987
|
+
function to(e, t) {
|
|
7889
7988
|
let { size: n } = e, r = 0;
|
|
7890
7989
|
for (let i = n - 1; i >= 1; i -= 2) {
|
|
7891
7990
|
i === 6 && (i = 5);
|
|
@@ -7899,7 +7998,7 @@ function Ka(e, t) {
|
|
|
7899
7998
|
}
|
|
7900
7999
|
}
|
|
7901
8000
|
}
|
|
7902
|
-
var
|
|
8001
|
+
var no = [
|
|
7903
8002
|
(e, t) => (e + t) % 2 == 0,
|
|
7904
8003
|
(e, t) => t % 2 == 0,
|
|
7905
8004
|
(e) => e % 3 == 0,
|
|
@@ -7909,10 +8008,10 @@ var qa = [
|
|
|
7909
8008
|
(e, t) => (e * t % 2 + e * t % 3) % 2 == 0,
|
|
7910
8009
|
(e, t) => ((e + t) % 2 + e * t % 3) % 2 == 0
|
|
7911
8010
|
];
|
|
7912
|
-
function
|
|
7913
|
-
for (let n = 0; n < e.size; n++) for (let r = 0; r < e.size; r++) !e.isFunction[n][r] &&
|
|
8011
|
+
function ro(e, t) {
|
|
8012
|
+
for (let n = 0; n < e.size; n++) for (let r = 0; r < e.size; r++) !e.isFunction[n][r] && no[t](r, n) && (e.modules[n][r] = !e.modules[n][r]);
|
|
7914
8013
|
}
|
|
7915
|
-
var
|
|
8014
|
+
var io = [[
|
|
7916
8015
|
!0,
|
|
7917
8016
|
!1,
|
|
7918
8017
|
!0,
|
|
@@ -7937,12 +8036,12 @@ var Ya = [[
|
|
|
7937
8036
|
!1,
|
|
7938
8037
|
!0
|
|
7939
8038
|
]];
|
|
7940
|
-
function
|
|
8039
|
+
function ao(e) {
|
|
7941
8040
|
let t = e.length, n = (t, n, r) => r ? e[t][n] : e[n][t], r = 0;
|
|
7942
8041
|
for (let e of [!1, !0]) for (let i = 0; i < t; i++) {
|
|
7943
8042
|
let a = 1;
|
|
7944
8043
|
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);
|
|
7945
|
-
for (let a = 0; a + 11 <= t; a++) for (let t of
|
|
8044
|
+
for (let a = 0; a + 11 <= t; a++) for (let t of io) t.every((t, r) => n(a + r, i, e) === t) && (r += 40);
|
|
7946
8045
|
}
|
|
7947
8046
|
for (let n = 0; n < t - 1; n++) for (let i = 0; i < t - 1; i++) {
|
|
7948
8047
|
let t = e[n][i];
|
|
@@ -7951,20 +8050,20 @@ function Xa(e) {
|
|
|
7951
8050
|
let i = e.reduce((e, t) => e + t.filter(Boolean).length, 0) * 100 / (t * t);
|
|
7952
8051
|
return r += Math.floor(Math.abs(i - 50) / 5) * 10, r;
|
|
7953
8052
|
}
|
|
7954
|
-
function
|
|
7955
|
-
if (!Object.hasOwn(
|
|
8053
|
+
function oo(e, t = "M") {
|
|
8054
|
+
if (!Object.hasOwn(za, t)) throw RangeError(`Invalid QR error correction level "${t}"; expected L, M, Q or H`);
|
|
7956
8055
|
let n = new TextEncoder().encode(e), r = 1;
|
|
7957
|
-
for (; r <= 40 && !(4 + (r <= 9 ? 8 : 16) + n.length * 8 <=
|
|
7958
|
-
if (r > 40) throw new
|
|
7959
|
-
let i =
|
|
7960
|
-
|
|
8056
|
+
for (; r <= 40 && !(4 + (r <= 9 ? 8 : 16) + n.length * 8 <= Wa(r, t) * 8); r++);
|
|
8057
|
+
if (r > 40) throw new Ra();
|
|
8058
|
+
let i = Xa(Ya(n, r, t), r, t), a = new Za(r * 4 + 17);
|
|
8059
|
+
Qa(a, r), to(a, i);
|
|
7961
8060
|
let o = 0, s = Infinity;
|
|
7962
8061
|
for (let e = 0; e < 8; e++) {
|
|
7963
|
-
|
|
7964
|
-
let n =
|
|
7965
|
-
n < s && (s = n, o = e),
|
|
8062
|
+
ro(a, e), $a(a, t, e);
|
|
8063
|
+
let n = ao(a.modules);
|
|
8064
|
+
n < s && (s = n, o = e), ro(a, e);
|
|
7966
8065
|
}
|
|
7967
|
-
return
|
|
8066
|
+
return ro(a, o), $a(a, t, o), {
|
|
7968
8067
|
size: a.size,
|
|
7969
8068
|
version: r,
|
|
7970
8069
|
modules: a.modules
|
|
@@ -7972,13 +8071,13 @@ function Za(e, t = "M") {
|
|
|
7972
8071
|
}
|
|
7973
8072
|
//#endregion
|
|
7974
8073
|
//#region src/components/ui/QrCode.tsx
|
|
7975
|
-
function
|
|
8074
|
+
function so({ value: e, errorCorrection: t = "M", size: n = 160, margin: r = 4, "aria-label": i = "QR code", fallback: a = null, className: o }) {
|
|
7976
8075
|
let s = d(() => {
|
|
7977
8076
|
if (!e) return null;
|
|
7978
8077
|
try {
|
|
7979
|
-
return
|
|
8078
|
+
return oo(e, t);
|
|
7980
8079
|
} catch (e) {
|
|
7981
|
-
if (e instanceof
|
|
8080
|
+
if (e instanceof Ra) return "too-long";
|
|
7982
8081
|
throw e;
|
|
7983
8082
|
}
|
|
7984
8083
|
}, [e, t]);
|
|
@@ -8012,7 +8111,7 @@ function Qa({ value: e, errorCorrection: t = "M", size: n = 160, margin: r = 4,
|
|
|
8012
8111
|
}
|
|
8013
8112
|
//#endregion
|
|
8014
8113
|
//#region src/components/ui/SearchInput.tsx
|
|
8015
|
-
function
|
|
8114
|
+
function co({ value: e, onChange: t, placeholder: n = "Search...", className: r }) {
|
|
8016
8115
|
return /* @__PURE__ */ g("div", {
|
|
8017
8116
|
className: V("relative", r),
|
|
8018
8117
|
children: [/* @__PURE__ */ h(z, { className: "text-text-tertiary absolute top-1/2 left-2 h-3.5 w-3.5 -translate-y-1/2" }), /* @__PURE__ */ h("input", {
|
|
@@ -8026,7 +8125,7 @@ function $a({ value: e, onChange: t, placeholder: n = "Search...", className: r
|
|
|
8026
8125
|
}
|
|
8027
8126
|
//#endregion
|
|
8028
8127
|
//#region src/components/ui/Select.tsx
|
|
8029
|
-
var
|
|
8128
|
+
var lo = i(({ label: e, error: t, options: n, className: r, id: i, ...a }, o) => {
|
|
8030
8129
|
let s = i || e?.toLowerCase().replace(/\s+/g, "-");
|
|
8031
8130
|
return /* @__PURE__ */ g("div", {
|
|
8032
8131
|
className: "flex flex-col gap-1.5",
|
|
@@ -8055,10 +8154,10 @@ var eo = i(({ label: e, error: t, options: n, className: r, id: i, ...a }, o) =>
|
|
|
8055
8154
|
})]
|
|
8056
8155
|
});
|
|
8057
8156
|
});
|
|
8058
|
-
|
|
8157
|
+
lo.displayName = "Select";
|
|
8059
8158
|
//#endregion
|
|
8060
8159
|
//#region src/components/ui/SettingRow.tsx
|
|
8061
|
-
function
|
|
8160
|
+
function uo({ label: e, description: t, action: n, className: r }) {
|
|
8062
8161
|
return /* @__PURE__ */ g("div", {
|
|
8063
8162
|
className: V("border-border flex items-center justify-between border-b py-3", r),
|
|
8064
8163
|
children: [/* @__PURE__ */ g("div", {
|
|
@@ -8078,7 +8177,7 @@ function to({ label: e, description: t, action: n, className: r }) {
|
|
|
8078
8177
|
}
|
|
8079
8178
|
//#endregion
|
|
8080
8179
|
//#region src/components/ui/SideSheet.tsx
|
|
8081
|
-
function
|
|
8180
|
+
function fo({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "right", widthClassName: o = "w-[360px]", className: s, contentClassName: l }) {
|
|
8082
8181
|
let u = f(null);
|
|
8083
8182
|
return ft(u, e), c(() => {
|
|
8084
8183
|
if (!e) return;
|
|
@@ -8089,86 +8188,79 @@ function no({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
|
|
|
8089
8188
|
document.removeEventListener("keydown", n), document.body.style.overflow = "";
|
|
8090
8189
|
};
|
|
8091
8190
|
}, [e, t]), e ? ue(/* @__PURE__ */ g("div", {
|
|
8092
|
-
className: "fixed inset-0 z-50
|
|
8093
|
-
children: [
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
/* @__PURE__ */
|
|
8107
|
-
className: "
|
|
8108
|
-
children:
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
i
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
]
|
|
8127
|
-
}),
|
|
8128
|
-
a === "left" && /* @__PURE__ */ h("div", {
|
|
8129
|
-
className: "bg-bg-overlay animate-fade-in flex-1",
|
|
8130
|
-
onClick: t
|
|
8131
|
-
})
|
|
8132
|
-
]
|
|
8191
|
+
className: "fixed inset-0 z-50",
|
|
8192
|
+
children: [/* @__PURE__ */ h("div", {
|
|
8193
|
+
className: "bg-bg-overlay animate-fade-in absolute inset-0",
|
|
8194
|
+
onClick: t
|
|
8195
|
+
}), /* @__PURE__ */ g("div", {
|
|
8196
|
+
ref: u,
|
|
8197
|
+
className: V("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),
|
|
8198
|
+
style: { maxWidth: "calc(100vw - 2rem)" },
|
|
8199
|
+
role: "dialog",
|
|
8200
|
+
"aria-modal": "true",
|
|
8201
|
+
"aria-label": typeof n == "string" ? n : "Panel",
|
|
8202
|
+
children: [
|
|
8203
|
+
/* @__PURE__ */ g("div", {
|
|
8204
|
+
className: "border-border flex h-10 shrink-0 items-center justify-between border-b px-3",
|
|
8205
|
+
children: [n && /* @__PURE__ */ h("h3", {
|
|
8206
|
+
className: "text-text-primary truncate text-xs font-semibold",
|
|
8207
|
+
children: n
|
|
8208
|
+
}), /* @__PURE__ */ h("button", {
|
|
8209
|
+
onClick: t,
|
|
8210
|
+
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover ml-auto flex h-6 w-6 cursor-pointer items-center justify-center rounded",
|
|
8211
|
+
"aria-label": "Close",
|
|
8212
|
+
children: /* @__PURE__ */ h(B, { className: "h-3.5 w-3.5" })
|
|
8213
|
+
})]
|
|
8214
|
+
}),
|
|
8215
|
+
/* @__PURE__ */ h("div", {
|
|
8216
|
+
className: V("flex-1 overflow-y-auto p-3", l),
|
|
8217
|
+
children: r
|
|
8218
|
+
}),
|
|
8219
|
+
i && /* @__PURE__ */ h("div", {
|
|
8220
|
+
className: "border-border flex gap-2 border-t p-3",
|
|
8221
|
+
children: i
|
|
8222
|
+
})
|
|
8223
|
+
]
|
|
8224
|
+
})]
|
|
8133
8225
|
}), document.body) : null;
|
|
8134
8226
|
}
|
|
8135
8227
|
//#endregion
|
|
8136
8228
|
//#region src/components/ui/SplitPaneLayout.tsx
|
|
8137
|
-
function
|
|
8229
|
+
function po({ children: e, direction: t = "row", className: n }) {
|
|
8138
8230
|
return /* @__PURE__ */ h("div", {
|
|
8139
8231
|
className: V("-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),
|
|
8140
8232
|
children: e
|
|
8141
8233
|
});
|
|
8142
8234
|
}
|
|
8143
|
-
function
|
|
8235
|
+
function mo({ children: e, className: t }) {
|
|
8144
8236
|
return /* @__PURE__ */ h("div", {
|
|
8145
8237
|
className: V("flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", t),
|
|
8146
8238
|
children: e
|
|
8147
8239
|
});
|
|
8148
8240
|
}
|
|
8149
|
-
var
|
|
8241
|
+
var ho = Object.assign(po, { Main: mo }), go = {
|
|
8150
8242
|
active: "bg-green",
|
|
8151
8243
|
inactive: "bg-text-tertiary",
|
|
8152
8244
|
pending: "bg-yellow animate-pulse-subtle",
|
|
8153
8245
|
error: "bg-red"
|
|
8154
|
-
},
|
|
8246
|
+
}, _o = {
|
|
8155
8247
|
active: "text-green",
|
|
8156
8248
|
inactive: "text-text-tertiary",
|
|
8157
8249
|
pending: "text-yellow",
|
|
8158
8250
|
error: "text-red"
|
|
8159
8251
|
};
|
|
8160
|
-
function
|
|
8252
|
+
function vo({ status: e, label: t, className: n }) {
|
|
8161
8253
|
return /* @__PURE__ */ g("span", {
|
|
8162
8254
|
className: V("inline-flex items-center gap-1.5", n),
|
|
8163
|
-
children: [/* @__PURE__ */ h("span", { className: V("h-2 w-2 rounded-full",
|
|
8164
|
-
className: V("text-xs",
|
|
8255
|
+
children: [/* @__PURE__ */ h("span", { className: V("h-2 w-2 rounded-full", go[e]) }), t && /* @__PURE__ */ h("span", {
|
|
8256
|
+
className: V("text-xs", _o[e]),
|
|
8165
8257
|
children: t
|
|
8166
8258
|
})]
|
|
8167
8259
|
});
|
|
8168
8260
|
}
|
|
8169
8261
|
//#endregion
|
|
8170
8262
|
//#region src/components/ui/StepProgress.tsx
|
|
8171
|
-
function
|
|
8263
|
+
function yo({ steps: e, currentStep: t, className: n }) {
|
|
8172
8264
|
return /* @__PURE__ */ h("div", {
|
|
8173
8265
|
className: V("flex items-center justify-between", n),
|
|
8174
8266
|
children: e.map((n, r) => /* @__PURE__ */ g("div", {
|
|
@@ -8195,7 +8287,7 @@ function lo({ steps: e, currentStep: t, className: n }) {
|
|
|
8195
8287
|
}
|
|
8196
8288
|
//#endregion
|
|
8197
8289
|
//#region src/components/ui/Tabs.tsx
|
|
8198
|
-
function
|
|
8290
|
+
function bo({ tabs: e, defaultTab: t, value: n, onChange: r, className: i }) {
|
|
8199
8291
|
let [a, o] = p(t || e[0]?.key), s = n ?? a, c = e.some((e) => e.key === s) ? s : e[0]?.key, u = e.find((e) => e.key === c);
|
|
8200
8292
|
function d(e) {
|
|
8201
8293
|
n === void 0 && o(e), r?.(e);
|
|
@@ -8233,7 +8325,7 @@ function uo({ tabs: e, defaultTab: t, value: n, onChange: r, className: i }) {
|
|
|
8233
8325
|
}
|
|
8234
8326
|
//#endregion
|
|
8235
8327
|
//#region src/components/ui/Textarea.tsx
|
|
8236
|
-
var
|
|
8328
|
+
var xo = i(({ label: e, error: t, showCount: n, maxLength: r, value: i, className: a, id: o, ...s }, c) => {
|
|
8237
8329
|
let l = o || e?.toLowerCase().replace(/\s+/g, "-"), u = typeof i == "string" ? i.length : 0;
|
|
8238
8330
|
return /* @__PURE__ */ g("div", {
|
|
8239
8331
|
className: "flex flex-col gap-1.5",
|
|
@@ -8268,10 +8360,10 @@ var fo = i(({ label: e, error: t, showCount: n, maxLength: r, value: i, classNam
|
|
|
8268
8360
|
]
|
|
8269
8361
|
});
|
|
8270
8362
|
});
|
|
8271
|
-
|
|
8363
|
+
xo.displayName = "Textarea";
|
|
8272
8364
|
//#endregion
|
|
8273
8365
|
//#region src/components/ui/TextInput.tsx
|
|
8274
|
-
var
|
|
8366
|
+
var So = i(({ label: e, error: t, icon: n, className: r, id: i, readOnly: a, "aria-describedby": o, ...s }, c) => {
|
|
8275
8367
|
let l = i || e?.toLowerCase().replace(/\s+/g, "-"), u = t && l ? `${l}-error` : void 0, d = [o, u].filter(Boolean).join(" ");
|
|
8276
8368
|
return /* @__PURE__ */ g("div", {
|
|
8277
8369
|
className: "flex flex-col gap-1.5",
|
|
@@ -8302,10 +8394,10 @@ var po = i(({ label: e, error: t, icon: n, className: r, id: i, readOnly: a, "ar
|
|
|
8302
8394
|
})]
|
|
8303
8395
|
});
|
|
8304
8396
|
});
|
|
8305
|
-
|
|
8397
|
+
So.displayName = "TextInput";
|
|
8306
8398
|
//#endregion
|
|
8307
8399
|
//#region src/components/ui/Timeline.tsx
|
|
8308
|
-
function
|
|
8400
|
+
function Co({ items: e, className: t }) {
|
|
8309
8401
|
return /* @__PURE__ */ h("div", {
|
|
8310
8402
|
className: V("space-y-0", t),
|
|
8311
8403
|
children: e.map((t, n) => /* @__PURE__ */ g("div", {
|
|
@@ -8328,16 +8420,16 @@ function mo({ items: e, className: t }) {
|
|
|
8328
8420
|
}
|
|
8329
8421
|
//#endregion
|
|
8330
8422
|
//#region src/components/ui/Tooltip.tsx
|
|
8331
|
-
var
|
|
8423
|
+
var wo = {
|
|
8332
8424
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
8333
8425
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
8334
8426
|
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
8335
8427
|
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
8336
8428
|
};
|
|
8337
|
-
function
|
|
8429
|
+
function To(e, t) {
|
|
8338
8430
|
return e ? `${e} ${t}` : t;
|
|
8339
8431
|
}
|
|
8340
|
-
function
|
|
8432
|
+
function Eo({ content: e, placement: t = "top", children: r }) {
|
|
8341
8433
|
let [i, o] = p(!1), s = l();
|
|
8342
8434
|
return /* @__PURE__ */ g("div", {
|
|
8343
8435
|
className: "relative inline-flex",
|
|
@@ -8345,9 +8437,9 @@ function _o({ content: e, placement: t = "top", children: r }) {
|
|
|
8345
8437
|
onMouseLeave: () => o(!1),
|
|
8346
8438
|
onFocus: () => o(!0),
|
|
8347
8439
|
onBlur: () => o(!1),
|
|
8348
|
-
children: [a(r) ? n(r, { "aria-describedby":
|
|
8440
|
+
children: [a(r) ? n(r, { "aria-describedby": To(r.props["aria-describedby"], s) }) : r, i && /* @__PURE__ */ h("div", {
|
|
8349
8441
|
id: s,
|
|
8350
|
-
className: V("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",
|
|
8442
|
+
className: V("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", wo[t]),
|
|
8351
8443
|
role: "tooltip",
|
|
8352
8444
|
children: e
|
|
8353
8445
|
})]
|
|
@@ -8355,7 +8447,7 @@ function _o({ content: e, placement: t = "top", children: r }) {
|
|
|
8355
8447
|
}
|
|
8356
8448
|
//#endregion
|
|
8357
8449
|
//#region src/components/ui/Toolbar.tsx
|
|
8358
|
-
function
|
|
8450
|
+
function Do({ start: e, end: t, children: n, className: r, startClassName: i, endClassName: a }) {
|
|
8359
8451
|
return /* @__PURE__ */ g("div", {
|
|
8360
8452
|
className: V("flex items-center justify-between gap-3", r),
|
|
8361
8453
|
children: [/* @__PURE__ */ h("div", {
|
|
@@ -8369,9 +8461,9 @@ function vo({ start: e, end: t, children: n, className: r, startClassName: i, en
|
|
|
8369
8461
|
}
|
|
8370
8462
|
//#endregion
|
|
8371
8463
|
//#region src/components/ui/UploadDropzone.tsx
|
|
8372
|
-
function
|
|
8464
|
+
function Oo({ title: e = "Drag and drop files here, or click to browse", description: t, icon: n, accept: r, multiple: i, disabled: a, onChange: o, className: s }) {
|
|
8373
8465
|
return /* @__PURE__ */ g("label", {
|
|
8374
|
-
className: V("border-border hover:border-border-strong block rounded-md border-2 border-dashed p-8 text-center transition-colors duration-[100ms]", a ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-bg-hover", s),
|
|
8466
|
+
className: V("border-border hover:border-border-strong relative block rounded-md border-2 border-dashed p-8 text-center transition-colors duration-[100ms]", a ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-bg-hover", s),
|
|
8375
8467
|
children: [
|
|
8376
8468
|
/* @__PURE__ */ h("input", {
|
|
8377
8469
|
type: "file",
|
|
@@ -8398,15 +8490,15 @@ function yo({ title: e = "Drag and drop files here, or click to browse", descrip
|
|
|
8398
8490
|
}
|
|
8399
8491
|
//#endregion
|
|
8400
8492
|
//#region src/providers/ThemeContext.ts
|
|
8401
|
-
var
|
|
8493
|
+
var ko = r({ theme: "dark" });
|
|
8402
8494
|
//#endregion
|
|
8403
8495
|
//#region src/hooks/useTheme.ts
|
|
8404
|
-
function
|
|
8405
|
-
return s(
|
|
8496
|
+
function Ao() {
|
|
8497
|
+
return s(ko);
|
|
8406
8498
|
}
|
|
8407
8499
|
//#endregion
|
|
8408
8500
|
//#region src/lib/formatDate.ts
|
|
8409
|
-
var
|
|
8501
|
+
var jo = [
|
|
8410
8502
|
"Jan",
|
|
8411
8503
|
"Feb",
|
|
8412
8504
|
"Mar",
|
|
@@ -8420,21 +8512,21 @@ var So = [
|
|
|
8420
8512
|
"Nov",
|
|
8421
8513
|
"Dec"
|
|
8422
8514
|
];
|
|
8423
|
-
function
|
|
8515
|
+
function Mo(e) {
|
|
8424
8516
|
return (/* @__PURE__ */ new Date(e + "T00:00:00")).toLocaleDateString("en-US", {
|
|
8425
8517
|
month: "short",
|
|
8426
8518
|
day: "numeric",
|
|
8427
8519
|
year: "numeric"
|
|
8428
8520
|
});
|
|
8429
8521
|
}
|
|
8430
|
-
function
|
|
8522
|
+
function No(e) {
|
|
8431
8523
|
return (/* @__PURE__ */ new Date(e + "T00:00:00")).toLocaleDateString("en-US", {
|
|
8432
8524
|
month: "long",
|
|
8433
8525
|
day: "numeric",
|
|
8434
8526
|
year: "numeric"
|
|
8435
8527
|
});
|
|
8436
8528
|
}
|
|
8437
|
-
function
|
|
8529
|
+
function Po(e, t = /* @__PURE__ */ new Date()) {
|
|
8438
8530
|
let n = t.getTime() - e.getTime(), r = Math.floor(n / 1e3);
|
|
8439
8531
|
if (r < 60) return "just now";
|
|
8440
8532
|
let i = Math.floor(r / 60);
|
|
@@ -8442,18 +8534,18 @@ function To(e, t = /* @__PURE__ */ new Date()) {
|
|
|
8442
8534
|
let a = Math.floor(i / 60);
|
|
8443
8535
|
if (a < 24) return `${a}h ago`;
|
|
8444
8536
|
if (Math.floor(a / 24) === 1) return "yesterday";
|
|
8445
|
-
let o = `${
|
|
8537
|
+
let o = `${jo[e.getMonth()]} ${e.getDate()}`;
|
|
8446
8538
|
return e.getFullYear() === t.getFullYear() ? o : `${o}, ${e.getFullYear()}`;
|
|
8447
8539
|
}
|
|
8448
8540
|
//#endregion
|
|
8449
8541
|
//#region src/providers/SettingsProvider.tsx
|
|
8450
|
-
var
|
|
8542
|
+
var Fo = {
|
|
8451
8543
|
"archivo-expanded": "\"Archivo\", \"Arial Black\", \"Avenir Next Condensed\", \"HelveticaNeue-CondensedBold\", system-ui, sans-serif",
|
|
8452
8544
|
inter: "\"Inter\", system-ui, -apple-system, BlinkMacSystemFont, sans-serif",
|
|
8453
8545
|
"jetbrains-mono": "\"JetBrains Mono\", Menlo, Monaco, Consolas, monospace",
|
|
8454
8546
|
"pt-serif": "\"PT Serif\", Georgia, ui-serif, Cambria, \"Times New Roman\", Times, serif",
|
|
8455
8547
|
system: "system-ui, -apple-system, BlinkMacSystemFont, sans-serif"
|
|
8456
|
-
},
|
|
8548
|
+
}, Io = {
|
|
8457
8549
|
purple: {
|
|
8458
8550
|
base: "#7C5CFC",
|
|
8459
8551
|
hover: "#6B4AEB",
|
|
@@ -8510,43 +8602,43 @@ var Eo = {
|
|
|
8510
8602
|
muted: "rgba(99,102,241,0.15)",
|
|
8511
8603
|
subtle: "rgba(99,102,241,0.08)"
|
|
8512
8604
|
}
|
|
8513
|
-
},
|
|
8605
|
+
}, Lo = "leonardaustin-ui-settings", Ro = new Set(Object.keys(Io)), zo = new Set(Object.keys(Ot)), Bo = new Set(Object.keys(Fo)), Vo = new Set([
|
|
8514
8606
|
"light",
|
|
8515
8607
|
"dark",
|
|
8516
8608
|
"system"
|
|
8517
8609
|
]);
|
|
8518
|
-
function
|
|
8610
|
+
function Ho(e, t, n, r) {
|
|
8519
8611
|
return typeof e != "number" || !isFinite(e) ? r : Math.min(n, Math.max(t, e));
|
|
8520
8612
|
}
|
|
8521
|
-
function
|
|
8613
|
+
function Uo(e) {
|
|
8522
8614
|
let t = {};
|
|
8523
|
-
if (
|
|
8615
|
+
if (Ro.has(e.accentColor) && (t.accentColor = e.accentColor), Vo.has(e.colorMode) && (t.colorMode = e.colorMode), zo.has(e.preferredDarkTheme) && !Ct(e.preferredDarkTheme) && (t.preferredDarkTheme = e.preferredDarkTheme), zo.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 = Ho(e.sidebarWidth, 160, 400, 220)), e.themeOverrides && typeof e.themeOverrides == "object") {
|
|
8524
8616
|
let n = {};
|
|
8525
8617
|
for (let [t, r] of Object.entries(e.themeOverrides)) {
|
|
8526
|
-
if (!
|
|
8618
|
+
if (!zo.has(t) || !r || typeof r != "object") continue;
|
|
8527
8619
|
let e = r, i = Ot[t];
|
|
8528
8620
|
n[t] = {
|
|
8529
|
-
uiFont:
|
|
8530
|
-
headingFont:
|
|
8531
|
-
proseFont:
|
|
8532
|
-
controlFont:
|
|
8533
|
-
labelFont:
|
|
8534
|
-
navigationFont:
|
|
8535
|
-
dataFont:
|
|
8536
|
-
codeFont:
|
|
8537
|
-
fontSize:
|
|
8538
|
-
borderRadius:
|
|
8539
|
-
borderWidth:
|
|
8540
|
-
tracking:
|
|
8541
|
-
lineHeight:
|
|
8542
|
-
density:
|
|
8621
|
+
uiFont: Bo.has(e.uiFont) ? e.uiFont : i.uiFont,
|
|
8622
|
+
headingFont: Bo.has(e.headingFont) ? e.headingFont : i.headingFont,
|
|
8623
|
+
proseFont: Bo.has(e.proseFont) ? e.proseFont : i.proseFont,
|
|
8624
|
+
controlFont: Bo.has(e.controlFont) ? e.controlFont : i.controlFont,
|
|
8625
|
+
labelFont: Bo.has(e.labelFont) ? e.labelFont : i.labelFont,
|
|
8626
|
+
navigationFont: Bo.has(e.navigationFont) ? e.navigationFont : i.navigationFont,
|
|
8627
|
+
dataFont: Bo.has(e.dataFont) ? e.dataFont : i.dataFont,
|
|
8628
|
+
codeFont: Bo.has(e.codeFont) ? e.codeFont : i.codeFont,
|
|
8629
|
+
fontSize: Ho(e.fontSize, 11, 18, i.fontSize),
|
|
8630
|
+
borderRadius: Ho(e.borderRadius, 0, 16, i.borderRadius),
|
|
8631
|
+
borderWidth: Ho(e.borderWidth, 1, 3, i.borderWidth),
|
|
8632
|
+
tracking: Ho(e.tracking, 0, .3, i.tracking),
|
|
8633
|
+
lineHeight: Ho(e.lineHeight, 1.2, 2, i.lineHeight),
|
|
8634
|
+
density: Ho(e.density, .18, .32, i.density)
|
|
8543
8635
|
};
|
|
8544
8636
|
}
|
|
8545
8637
|
t.themeOverrides = n;
|
|
8546
8638
|
}
|
|
8547
8639
|
return t;
|
|
8548
8640
|
}
|
|
8549
|
-
var
|
|
8641
|
+
var Wo = {
|
|
8550
8642
|
accentColor: "purple",
|
|
8551
8643
|
sidebarCollapsed: !1,
|
|
8552
8644
|
sidebarWidth: 220,
|
|
@@ -8556,31 +8648,31 @@ var Fo = {
|
|
|
8556
8648
|
preferredLightTheme: "light",
|
|
8557
8649
|
themeOverrides: {}
|
|
8558
8650
|
};
|
|
8559
|
-
function
|
|
8560
|
-
if (typeof localStorage > "u") return
|
|
8651
|
+
function Go(e) {
|
|
8652
|
+
if (typeof localStorage > "u") return Wo;
|
|
8561
8653
|
try {
|
|
8562
8654
|
let t = localStorage.getItem(e);
|
|
8563
8655
|
if (t) return {
|
|
8564
|
-
...
|
|
8565
|
-
...
|
|
8656
|
+
...Wo,
|
|
8657
|
+
...Uo(JSON.parse(t))
|
|
8566
8658
|
};
|
|
8567
8659
|
} catch (e) {
|
|
8568
8660
|
console.warn("[SettingsProvider] Failed to load settings:", e);
|
|
8569
8661
|
}
|
|
8570
|
-
return
|
|
8662
|
+
return Wo;
|
|
8571
8663
|
}
|
|
8572
|
-
function
|
|
8664
|
+
function Ko(e, t) {
|
|
8573
8665
|
let n = Ot[e] ?? Ot.dark;
|
|
8574
8666
|
return t[e] ? {
|
|
8575
8667
|
...n,
|
|
8576
8668
|
...t[e]
|
|
8577
8669
|
} : n;
|
|
8578
8670
|
}
|
|
8579
|
-
function
|
|
8671
|
+
function qo(e, t) {
|
|
8580
8672
|
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;
|
|
8581
8673
|
}
|
|
8582
|
-
function
|
|
8583
|
-
let [n, r] = p(() =>
|
|
8674
|
+
function Jo({ children: e, storageKey: t = Lo }) {
|
|
8675
|
+
let [n, r] = p(() => Go(t)), [i, a] = p(() => typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
8584
8676
|
c(() => {
|
|
8585
8677
|
if (typeof window > "u") return;
|
|
8586
8678
|
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e) => a(e.matches);
|
|
@@ -8591,9 +8683,9 @@ function zo({ children: e, storageKey: t = Oo }) {
|
|
|
8591
8683
|
n.preferredDarkTheme,
|
|
8592
8684
|
n.preferredLightTheme,
|
|
8593
8685
|
i
|
|
8594
|
-
]), [l, u] = p(() =>
|
|
8686
|
+
]), [l, u] = p(() => Ko(s, n.themeOverrides));
|
|
8595
8687
|
c(() => {
|
|
8596
|
-
u(
|
|
8688
|
+
u(Ko(s, n.themeOverrides));
|
|
8597
8689
|
}, [s]);
|
|
8598
8690
|
let f = o((e) => {
|
|
8599
8691
|
r((n) => {
|
|
@@ -8610,15 +8702,15 @@ function zo({ children: e, storageKey: t = Oo }) {
|
|
|
8610
8702
|
});
|
|
8611
8703
|
}, [t]);
|
|
8612
8704
|
c(() => {
|
|
8613
|
-
let e = document.documentElement, t =
|
|
8705
|
+
let e = document.documentElement, t = Io[n.accentColor];
|
|
8614
8706
|
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);
|
|
8615
8707
|
}, [n.accentColor]), c(() => {
|
|
8616
8708
|
document.documentElement.classList.toggle("reduced-motion", n.reducedMotion);
|
|
8617
8709
|
}, [n.reducedMotion]), c(() => {
|
|
8618
8710
|
let e = document.documentElement, t = l.borderRadius;
|
|
8619
|
-
e.style.fontSize = `${l.fontSize / 13 * 100}%`, e.style.setProperty("--font-ui",
|
|
8711
|
+
e.style.fontSize = `${l.fontSize / 13 * 100}%`, e.style.setProperty("--font-ui", Fo[l.uiFont]), e.style.setProperty("--font-heading", Fo[l.headingFont]), e.style.setProperty("--font-prose", Fo[l.proseFont]), e.style.setProperty("--font-control", Fo[l.controlFont]), e.style.setProperty("--font-label", Fo[l.labelFont]), e.style.setProperty("--font-navigation", Fo[l.navigationFont]), e.style.setProperty("--font-data", Fo[l.dataFont]), e.style.setProperty("--font-code", Fo[l.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", `${l.borderWidth}px`), e.style.setProperty("--ui-tracking", `${l.tracking}em`), e.style.setProperty("--ui-line-height", String(l.lineHeight)), e.style.setProperty("--ui-density", `${l.density}rem`);
|
|
8620
8712
|
}, [l]);
|
|
8621
|
-
let m = d(() =>
|
|
8713
|
+
let m = d(() => Ko(s, n.themeOverrides), [s, n.themeOverrides]), g = s in n.themeOverrides, _ = !qo(l, m), v = o(() => {
|
|
8622
8714
|
f({ themeOverrides: {
|
|
8623
8715
|
...n.themeOverrides,
|
|
8624
8716
|
[s]: { ...l }
|
|
@@ -8742,28 +8834,29 @@ function zo({ children: e, storageKey: t = Oo }) {
|
|
|
8742
8834
|
}
|
|
8743
8835
|
//#endregion
|
|
8744
8836
|
//#region src/providers/ThemeProvider.tsx
|
|
8745
|
-
var
|
|
8837
|
+
var Yo = {
|
|
8746
8838
|
dark: "",
|
|
8747
8839
|
light: "theme-light",
|
|
8840
|
+
lightInverted: "theme-light-inverted",
|
|
8748
8841
|
monokai: "theme-monokai",
|
|
8749
8842
|
solarized: "theme-solarized",
|
|
8750
8843
|
cyberBrutalDark: "theme-cyber-brutal-dark",
|
|
8751
8844
|
cyberBrutalLight: "theme-cyber-brutal-light",
|
|
8752
8845
|
hashiTheme: "theme-hashi"
|
|
8753
8846
|
};
|
|
8754
|
-
function
|
|
8847
|
+
function Xo({ children: e }) {
|
|
8755
8848
|
let { resolvedTheme: t } = s(Mt);
|
|
8756
8849
|
return c(() => {
|
|
8757
8850
|
let e = document.documentElement;
|
|
8758
|
-
Object.values(
|
|
8851
|
+
Object.values(Yo).forEach((t) => {
|
|
8759
8852
|
t && e.classList.remove(t);
|
|
8760
8853
|
});
|
|
8761
|
-
let n =
|
|
8854
|
+
let n = Yo[t];
|
|
8762
8855
|
n && e.classList.add(n);
|
|
8763
|
-
}, [t]), /* @__PURE__ */ h(
|
|
8856
|
+
}, [t]), /* @__PURE__ */ h(ko.Provider, {
|
|
8764
8857
|
value: { theme: t },
|
|
8765
8858
|
children: e
|
|
8766
8859
|
});
|
|
8767
8860
|
}
|
|
8768
8861
|
//#endregion
|
|
8769
|
-
export { In as Alert, En as AppShell, He as AreaChart, Ln as AuthCard, Dn as AuthLayout, Rn as AuthorByline, Lt as Avatar, On as BackLink, Vn as Badge, Ge as BarChart, ut as BottomNav, tn as Breadcrumbs, un as Button, pt as COMMAND_PALETTE_EVENT, Ci as Calendar, Ai as CalendarGrid, ji as Card, kn as Checkbox, Li as CodeInput, jn as ColumnPicker, Ri as Combobox, vt as CommandPalette, mi as DEFAULT_CALENDAR_LABELS, mt as DEFAULT_COMMAND_PALETTE_SHORTCUT, zi as DangerZone, Vi as DatePicker, Gi as DateRangePicker, Zi as DateTimePicker, ta as DetailPanel,
|
|
8862
|
+
export { In as Alert, En as AppShell, He as AreaChart, Ln as AuthCard, Dn as AuthLayout, Rn as AuthorByline, Lt as Avatar, On as BackLink, Vn as Badge, Ge as BarChart, ut as BottomNav, tn as Breadcrumbs, un as Button, pt as COMMAND_PALETTE_EVENT, Ci as Calendar, Ai as CalendarGrid, ji as Card, kn as Checkbox, Li as CodeInput, jn as ColumnPicker, Ri as Combobox, vt as CommandPalette, mi as DEFAULT_CALENDAR_LABELS, mt as DEFAULT_COMMAND_PALETTE_SHORTCUT, zi as DangerZone, Vi as DatePicker, Gi as DateRangePicker, Zi as DateTimePicker, ta as DetailPanel, da as Dialog, fa as DialogActions, pa as DividerLabel, qe as DonutChart, ma as DropdownMenu, ha as EmptyState, ga as ErrorBoundary, An as FilterButton, _a as FilterDropdown, va as Kbd, ba as LoadingSpinner, xa as MetadataGrid, Sa as MetricCard, bt as MobileDrawer, Da as OAuthButton, Oa as PageHeader, ka as PageSection, Mn as Pagination, ja as PaginationBar, Ma as PasswordInput, Fa as PasswordRequirements, Ia as ProfileHeader, La as ProseContent, Ra as QrCapacityError, so as QrCode, Je as RadarChart, Ye as RadialBarChart, hi as RadioPill, Pn as ResourceTable, co as SearchInput, dn as SectionHeader, lo as Select, pn as SelectDropdown, uo as SettingRow, Mt as SettingsContext, Jo as SettingsProvider, fo as SideSheet, $t as Sidebar, mn as Slider, Xe as SparkLine, ho as SplitPaneLayout, rt as StackedBarChart, vo as StatusDot, yo as StepProgress, _n as THEME_MENU_EVENT, bo as Tabs, So as TextInput, xo as Textarea, ko as ThemeContext, bn as ThemeMenu, hn as ThemePreview, Xo as ThemeProvider, Co as Timeline, Bt as ToastProvider, gn as Toggle, Do as Toolbar, Eo as Tooltip, wn as TopBar, Oo as UploadDropzone, ot as VerticalBarChart, At as accentItems, Y as addDays, Kn as addMinutes, qn as addMonths, V as cn, Tt as darkThemes, Z as dateAtMinutes, Na as defaultPasswordRequirements, Zn as differenceInDays, oo as encodeQrCode, Er as expandAvailabilityRules, kt as fontOptions, No as formatDateLong, Mo as formatDateShort, hr as formatRangeTitle, Po as formatRelative, dr as formatTime, er as formatTimeOfDay, fr as formatTimeRange, tr as fromDateKey, Tr as getActiveResourceIds, sr as getViewRange, ar as getVisibleDays, ct as handleAppShellNavigate, Nr as isAllDayLike, st as isAppShellPathActive, Ct as isLightTheme, Xn as isSameDay, ir as isTimeGridView, br as layoutOverlaps, wt as lightThemes, gt as matchesCommandPaletteShortcut, Pa as meetsPasswordRequirements, X as minutesOfDay, lt as navigateToPath, ht as openCommandPalette, vn as openThemeMenu, $n as parseTime, gr as rangesOverlap, cr as shiftDate, rr as snapDate, nr as snapMinutes, Nn as sortRows, Gn as startOfDay, Yn as startOfMonth, Jn as startOfWeek, Ot as themeDefaults, xt as themeItems, Q as toDateKey, nn as useApplyTheme, jt as useDismiss, ft as useFocusTrap, Nt as useSettings, Ao as useTheme, zt as useToast };
|