@leonardaustin/ui 0.1.0 → 0.1.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/README.md CHANGED
@@ -4,12 +4,9 @@ Reusable React components, application shell, charts, tables, form controls, and
4
4
  theme tooling for Leonard Austin projects.
5
5
 
6
6
  ```bash
7
- pnpm add github:leonardaustin/ui react react-dom lucide-react
7
+ pnpm add @leonardaustin/ui react react-dom lucide-react
8
8
  ```
9
9
 
10
- This installs straight from GitHub. To pin a release, append a tag:
11
- `github:leonardaustin/ui#v0.1.0`.
12
-
13
10
  Import the stylesheet once:
14
11
 
15
12
  ```tsx
package/dist/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { Component as e, Fragment as t, createContext as n, forwardRef as r, useCallback as i, useContext as a, useEffect as o, useId as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
2
2
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
3
- import { clsx as h } from "clsx";
4
- import { Accessibility as g, AlertTriangle as _, ArrowDown as v, ArrowLeft as y, ArrowUp as b, BookOpen as x, Calendar as S, Check as C, CheckCircle2 as w, ChevronDown as T, ChevronLeft as E, ChevronRight as D, ChevronsUpDown as O, Columns3 as k, Eye as A, EyeOff as j, Inbox as ee, Info as te, Loader2 as ne, LogOut as re, Menu as ie, Minus as ae, Monitor as oe, Moon as se, Palette as ce, PanelLeft as le, PanelLeftDashed as ue, Search as M, Settings as de, Sun as fe, UploadCloud as pe, X as N, XCircle as me, Zap as he } from "lucide-react";
3
+ import { Accessibility as h, AlertTriangle as g, ArrowDown as _, ArrowLeft as v, ArrowUp as y, BookOpen as b, Calendar as x, Check as S, CheckCircle2 as C, ChevronDown as w, ChevronLeft as T, ChevronRight as E, ChevronsUpDown as D, Columns3 as O, Eye as k, EyeOff as A, Inbox as ee, Info as j, Loader2 as te, LogOut as ne, Menu as re, Minus as ie, Monitor as ae, Moon as oe, Palette as se, PanelLeft as ce, PanelLeftDashed as le, Search as M, Settings as ue, Sun as de, UploadCloud as fe, X as N, XCircle as pe, Zap as me } from "lucide-react";
5
4
  import { createPortal as P } from "react-dom";
6
5
  //#region src/components/charts/AreaChart.tsx
7
6
  var F = {
@@ -10,10 +9,10 @@ var F = {
10
9
  bottom: 28,
11
10
  left: 48
12
11
  };
13
- function ge(e) {
12
+ function he(e) {
14
13
  return e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}k` : String(e);
15
14
  }
16
- function _e({ data: e, height: t = 240 }) {
15
+ function ge({ data: e, height: t = 240 }) {
17
16
  let n = s(), r = u(null), [i, a] = d(null), o = 600 - F.left - F.right, c = t - F.top - F.bottom, l = Math.min(...e.map((e) => e.value)), h = Math.max(...e.map((e) => e.value)), g = h - l || 1;
18
17
  function _(t) {
19
18
  return F.left + t / Math.max(e.length - 1, 1) * o;
@@ -70,7 +69,7 @@ function _e({ data: e, height: t = 240 }) {
70
69
  dominantBaseline: "central",
71
70
  fill: "var(--text-tertiary)",
72
71
  fontSize: 10,
73
- children: ge(h)
72
+ children: he(h)
74
73
  }),
75
74
  /* @__PURE__ */ p("text", {
76
75
  x: F.left - 8,
@@ -79,7 +78,7 @@ function _e({ data: e, height: t = 240 }) {
79
78
  dominantBaseline: "central",
80
79
  fill: "var(--text-tertiary)",
81
80
  fontSize: 10,
82
- children: ge(l)
81
+ children: he(l)
83
82
  }),
84
83
  /* @__PURE__ */ p("line", {
85
84
  x1: F.left,
@@ -167,14 +166,14 @@ function _e({ data: e, height: t = 240 }) {
167
166
  }
168
167
  //#endregion
169
168
  //#region src/components/charts/BarChart.tsx
170
- var ve = [
169
+ var _e = [
171
170
  1,
172
171
  .85,
173
172
  .7,
174
173
  .55,
175
174
  .45
176
175
  ];
177
- function ye({ data: e, height: t }) {
176
+ function ve({ data: e, height: t }) {
178
177
  let [n, r] = d(null), i = Math.max(...e.map((e) => e.value));
179
178
  return /* @__PURE__ */ p("svg", {
180
179
  width: "100%",
@@ -220,7 +219,7 @@ function ye({ data: e, height: t }) {
220
219
  height: 22,
221
220
  fill: "var(--accent)",
222
221
  rx: 6,
223
- opacity: s ? 1 : ve[t % ve.length],
222
+ opacity: s ? 1 : _e[t % _e.length],
224
223
  style: { transition: "all 150ms" }
225
224
  }),
226
225
  /* @__PURE__ */ p("text", {
@@ -240,6 +239,18 @@ function ye({ data: e, height: t }) {
240
239
  }
241
240
  //#endregion
242
241
  //#region src/lib/cn.ts
242
+ function ye(e) {
243
+ if (typeof e == "string" || typeof e == "number" || typeof e == "bigint") return String(e);
244
+ if (!e || typeof e != "object") return "";
245
+ let t = "";
246
+ if (Array.isArray(e)) for (let n of e) {
247
+ if (!n) continue;
248
+ let e = ye(n);
249
+ e && (t = t ? `${t} ${e}` : e);
250
+ }
251
+ else for (let n in e) e[n] && (t = t ? `${t} ${n}` : n);
252
+ return t;
253
+ }
243
254
  var be = new Set([
244
255
  "block",
245
256
  "contents",
@@ -345,7 +356,7 @@ var be = new Set([
345
356
  "border-solid"
346
357
  ]);
347
358
  function I(...e) {
348
- return Ae(h(e));
359
+ return Ae(ye(e));
349
360
  }
350
361
  function Ae(e) {
351
362
  let t = [], n = /* @__PURE__ */ new Map();
@@ -954,17 +965,17 @@ function Ze({ data: e, height: t = 180 }) {
954
965
  }
955
966
  //#endregion
956
967
  //#region src/components/app-shell/navigation.ts
957
- function R(e, t) {
968
+ function Qe(e, t) {
958
969
  if (!t) return !1;
959
970
  if (e.end ?? e.path === "/") return t === e.path;
960
971
  let n = e.path.endsWith("/") ? e.path : `${e.path}/`;
961
972
  return t === e.path || t.startsWith(n);
962
973
  }
963
- function z(e, t, n, r) {
974
+ function R(e, t, n, r) {
964
975
  let i = e.currentTarget.getAttribute("target");
965
976
  e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || i && i !== "_self" || (n && (e.preventDefault(), n(t)), r?.());
966
977
  }
967
- function Qe(e, t) {
978
+ function z(e, t) {
968
979
  if (t) {
969
980
  t(e);
970
981
  return;
@@ -980,10 +991,10 @@ function $e({ items: e, currentPath: t, onNavigate: n, className: r }) {
980
991
  children: /* @__PURE__ */ p("ul", {
981
992
  className: "flex h-full items-center justify-around",
982
993
  children: e.map((e) => {
983
- let r = R(e, t);
994
+ let r = Qe(e, t);
984
995
  return /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m("a", {
985
996
  href: e.path,
986
- onClick: (t) => z(t, e.path, n),
997
+ onClick: (t) => R(t, e.path, n),
987
998
  "aria-current": r ? "page" : void 0,
988
999
  className: I("font-navigation flex h-full w-14 flex-col items-center justify-center gap-0.5", "cursor-pointer transition-colors duration-[100ms]", r ? "text-accent" : "text-text-tertiary"),
989
1000
  children: [/* @__PURE__ */ p(e.icon, { className: "h-5 w-5" }), /* @__PURE__ */ p("span", {
@@ -1067,7 +1078,7 @@ function ot({ items: e, eventName: t = tt, shortcut: n = nt, placeholder: r = "S
1067
1078
  _(e), y(0);
1068
1079
  }
1069
1080
  function E(e) {
1070
- l?.(e), Qe(e.path, c), h(!1);
1081
+ l?.(e), z(e.path, c), h(!1);
1071
1082
  }
1072
1083
  function D(e) {
1073
1084
  e.key === "ArrowDown" ? (e.preventDefault(), y((e) => Math.min(e + 1, C.length - 1))) : e.key === "ArrowUp" ? (e.preventDefault(), y((e) => Math.max(e - 1, 0))) : e.key === "Enter" && C[v] ? E(C[v]) : e.key === "Escape" && h(!1);
@@ -1174,10 +1185,10 @@ function ct({ open: e, onClose: t, items: n, brand: r, currentPath: i, onNavigat
1174
1185
  children: /* @__PURE__ */ p("ul", {
1175
1186
  className: "space-y-0.5",
1176
1187
  children: n.map((e) => {
1177
- let n = R(e, i);
1188
+ let n = Qe(e, i);
1178
1189
  return /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m("a", {
1179
1190
  href: e.path,
1180
- onClick: (n) => z(n, e.path, a, t),
1191
+ onClick: (n) => R(n, e.path, a, t),
1181
1192
  "aria-current": n ? "page" : void 0,
1182
1193
  className: I("flex h-10 items-center gap-3 rounded-md px-3", "cursor-pointer transition-colors duration-[100ms]", n ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
1183
1194
  children: [/* @__PURE__ */ p(e.icon, { className: "h-4 w-4" }), /* @__PURE__ */ p("span", {
@@ -1197,7 +1208,7 @@ var lt = [
1197
1208
  {
1198
1209
  value: "dark",
1199
1210
  label: "Dark",
1200
- icon: se,
1211
+ icon: oe,
1201
1212
  preview: {
1202
1213
  bg: "#0d0f12",
1203
1214
  fg: "#2a2e38"
@@ -1206,7 +1217,7 @@ var lt = [
1206
1217
  {
1207
1218
  value: "light",
1208
1219
  label: "Light",
1209
- icon: fe,
1220
+ icon: de,
1210
1221
  preview: {
1211
1222
  bg: "#f5f5f5",
1212
1223
  fg: "#d4d4d8"
@@ -1215,7 +1226,7 @@ var lt = [
1215
1226
  {
1216
1227
  value: "monokai",
1217
1228
  label: "Monokai",
1218
- icon: ce,
1229
+ icon: se,
1219
1230
  preview: {
1220
1231
  bg: "#272822",
1221
1232
  fg: "#3E3D32"
@@ -1224,7 +1235,7 @@ var lt = [
1224
1235
  {
1225
1236
  value: "solarized",
1226
1237
  label: "Solarized",
1227
- icon: oe,
1238
+ icon: ae,
1228
1239
  preview: {
1229
1240
  bg: "#002B36",
1230
1241
  fg: "#0A3F4C"
@@ -1233,7 +1244,7 @@ var lt = [
1233
1244
  {
1234
1245
  value: "cyberBrutalDark",
1235
1246
  label: "Cyber Brutal Dark",
1236
- icon: he,
1247
+ icon: me,
1237
1248
  preview: {
1238
1249
  bg: "#050505",
1239
1250
  fg: "#18181b"
@@ -1242,7 +1253,7 @@ var lt = [
1242
1253
  {
1243
1254
  value: "cyberBrutalLight",
1244
1255
  label: "Cyber Brutal Light",
1245
- icon: he,
1256
+ icon: me,
1246
1257
  preview: {
1247
1258
  bg: "#e4e4e7",
1248
1259
  fg: "#d4d4d8"
@@ -1251,7 +1262,7 @@ var lt = [
1251
1262
  {
1252
1263
  value: "hashiTheme",
1253
1264
  label: "HashiTheme",
1254
- icon: x,
1265
+ icon: b,
1255
1266
  preview: {
1256
1267
  bg: "#ffffff",
1257
1268
  fg: "#364153"
@@ -1509,10 +1520,10 @@ function xt({ children: e }) {
1509
1520
  });
1510
1521
  }
1511
1522
  var St = {
1512
- success: w,
1513
- error: me,
1514
- warning: _,
1515
- info: te
1523
+ success: C,
1524
+ error: pe,
1525
+ warning: g,
1526
+ info: j
1516
1527
  }, Ct = {
1517
1528
  success: "bg-green",
1518
1529
  error: "bg-red",
@@ -1569,10 +1580,10 @@ function Tt({ toast: e, onDismiss: t }) {
1569
1580
  //#region src/components/app-shell/Sidebar.tsx
1570
1581
  var Et = 140, Dt = 400, Ot = 48;
1571
1582
  function kt({ item: e, collapsed: t, currentPath: n, onNavigate: r }) {
1572
- let i = R(e, n);
1583
+ let i = Qe(e, n);
1573
1584
  return /* @__PURE__ */ m("a", {
1574
1585
  href: e.path,
1575
- onClick: (t) => z(t, e.path, r),
1586
+ onClick: (t) => R(t, e.path, r),
1576
1587
  "aria-current": i ? "page" : void 0,
1577
1588
  className: I("font-navigation relative flex items-center gap-2 rounded px-2", "cursor-pointer transition-colors duration-[100ms]", t ? "mx-auto w-[2em] justify-center" : "", i ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
1578
1589
  style: { height: "2em" },
@@ -1621,7 +1632,7 @@ function Mt({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
1621
1632
  left: 0
1622
1633
  }), b = u(null), x = u(null);
1623
1634
  W(l, i(() => h(!1), []), [x], [b]);
1624
- let S = t[g] ?? t[0], w = !!(a || o);
1635
+ let C = t[g] ?? t[0], w = !!(a || o);
1625
1636
  function T() {
1626
1637
  if (!b.current) return;
1627
1638
  let e = b.current.getBoundingClientRect();
@@ -1633,29 +1644,29 @@ function Mt({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
1633
1644
  function E(e, t) {
1634
1645
  _(t), r?.(e, t), h(!1);
1635
1646
  }
1636
- function D() {
1637
- h(!1), a ? a() : o && Qe(o, c);
1647
+ function O() {
1648
+ h(!1), a ? a() : o && z(o, c);
1638
1649
  }
1639
- return S ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("button", {
1650
+ return C ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("button", {
1640
1651
  ref: b,
1641
1652
  onClick: T,
1642
1653
  className: I("font-navigation flex w-full cursor-pointer items-center gap-2 rounded px-2 transition-colors duration-[100ms]", "text-text-secondary hover:text-text-primary hover:bg-bg-hover", e && "justify-center px-0"),
1643
1654
  style: { height: "2.5em" },
1644
- title: e ? S.name : void 0,
1655
+ title: e ? C.name : void 0,
1645
1656
  children: [/* @__PURE__ */ p(q, {
1646
- name: S.name,
1647
- src: S.avatarSrc,
1657
+ name: C.name,
1658
+ src: C.avatarSrc,
1648
1659
  size: "sm"
1649
1660
  }), !e && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", {
1650
1661
  className: "min-w-0 flex-1 text-left",
1651
1662
  children: [/* @__PURE__ */ p("p", {
1652
1663
  className: "text-text-primary truncate text-xs leading-tight font-medium",
1653
- children: S.name
1654
- }), jt(S) && /* @__PURE__ */ p("p", {
1664
+ children: C.name
1665
+ }), jt(C) && /* @__PURE__ */ p("p", {
1655
1666
  className: "text-2xs text-text-tertiary truncate leading-tight",
1656
- children: jt(S)
1667
+ children: jt(C)
1657
1668
  })]
1658
- }), /* @__PURE__ */ p(O, { className: "text-text-tertiary h-3 w-3 shrink-0" })] })]
1669
+ }), /* @__PURE__ */ p(D, { className: "text-text-tertiary h-3 w-3 shrink-0" })] })]
1659
1670
  }), l && P(/* @__PURE__ */ m("div", {
1660
1671
  ref: x,
1661
1672
  className: "bg-bg-tertiary border-border-strong animate-scale-in fixed z-[100] w-56 rounded-md border py-1 shadow-lg",
@@ -1687,13 +1698,13 @@ function Mt({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
1687
1698
  children: e.email
1688
1699
  })]
1689
1700
  }),
1690
- t === g && /* @__PURE__ */ p(C, { className: "text-accent h-3.5 w-3.5 shrink-0" })
1701
+ t === g && /* @__PURE__ */ p(S, { className: "text-accent h-3.5 w-3.5 shrink-0" })
1691
1702
  ]
1692
1703
  }, `${e.name}-${e.email ?? t}`)),
1693
1704
  w && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", { className: "border-border my-1 border-t" }), /* @__PURE__ */ m("button", {
1694
- onClick: D,
1705
+ onClick: O,
1695
1706
  className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-7 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
1696
- children: [/* @__PURE__ */ p(re, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ p("span", { children: s })]
1707
+ children: [/* @__PURE__ */ p(ne, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ p("span", { children: s })]
1697
1708
  })] })
1698
1709
  ]
1699
1710
  }), document.body)] }) : null;
@@ -1702,26 +1713,26 @@ function Nt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
1702
1713
  let [o, s] = d(!1), [c, l] = d({
1703
1714
  bottom: 0,
1704
1715
  left: 0
1705
- }), h = u(null), _ = u(null), { accentColor: v, setAccentColor: y, reducedMotion: b, setReducedMotion: x, colorMode: S, setColorMode: w } = K(), { toast: T } = bt(), E = !!(t || r);
1706
- W(o, i(() => s(!1), []), [_], [h]);
1716
+ }), g = u(null), _ = u(null), { accentColor: v, setAccentColor: y, reducedMotion: b, setReducedMotion: x, colorMode: C, setColorMode: w } = K(), { toast: T } = bt(), E = !!(t || r);
1717
+ W(o, i(() => s(!1), []), [_], [g]);
1707
1718
  function D() {
1708
- if (!h.current) return;
1709
- let e = h.current.getBoundingClientRect();
1719
+ if (!g.current) return;
1720
+ let e = g.current.getBoundingClientRect();
1710
1721
  l({
1711
1722
  bottom: window.innerHeight - e.bottom,
1712
1723
  left: e.right + 6
1713
1724
  }), s(!o);
1714
1725
  }
1715
1726
  function O() {
1716
- s(!1), r ? r() : t && Qe(t, a);
1727
+ s(!1), r ? r() : t && z(t, a);
1717
1728
  }
1718
1729
  return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("button", {
1719
- ref: h,
1730
+ ref: g,
1720
1731
  onClick: D,
1721
1732
  className: I("font-navigation relative flex w-full items-center gap-2 rounded px-2", "cursor-pointer transition-colors duration-[100ms]", e ? "mx-auto w-[2em] justify-center" : "", o ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
1722
1733
  style: { height: "2em" },
1723
1734
  title: e ? "Settings" : void 0,
1724
- children: [/* @__PURE__ */ p(de, { className: "h-3.5 w-3.5 shrink-0" }), !e && /* @__PURE__ */ p("span", {
1735
+ children: [/* @__PURE__ */ p(ue, { className: "h-3.5 w-3.5 shrink-0" }), !e && /* @__PURE__ */ p("span", {
1725
1736
  className: "truncate text-xs",
1726
1737
  children: "Settings"
1727
1738
  })]
@@ -1741,17 +1752,17 @@ function Nt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
1741
1752
  {
1742
1753
  value: "dark",
1743
1754
  label: "Dark",
1744
- Icon: se
1755
+ Icon: oe
1745
1756
  },
1746
1757
  {
1747
1758
  value: "light",
1748
1759
  label: "Light",
1749
- Icon: fe
1760
+ Icon: de
1750
1761
  },
1751
1762
  {
1752
1763
  value: "system",
1753
1764
  label: "System",
1754
- Icon: oe
1765
+ Icon: ae
1755
1766
  }
1756
1767
  ].map(({ value: e, label: t, Icon: n }) => /* @__PURE__ */ m("button", {
1757
1768
  onClick: () => w(e),
@@ -1762,7 +1773,7 @@ function Nt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
1762
1773
  className: "flex-1 text-left",
1763
1774
  children: t
1764
1775
  }),
1765
- S === e && /* @__PURE__ */ p(C, { className: "text-accent h-3.5 w-3.5 shrink-0" })
1776
+ C === e && /* @__PURE__ */ p(S, { className: "text-accent h-3.5 w-3.5 shrink-0" })
1766
1777
  ]
1767
1778
  }, e)),
1768
1779
  /* @__PURE__ */ p("div", { className: "border-border my-1 border-t" }),
@@ -1789,18 +1800,18 @@ function Nt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
1789
1800
  },
1790
1801
  className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-7 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
1791
1802
  children: [
1792
- /* @__PURE__ */ p(g, { className: "h-3.5 w-3.5 shrink-0" }),
1803
+ /* @__PURE__ */ p(h, { className: "h-3.5 w-3.5 shrink-0" }),
1793
1804
  /* @__PURE__ */ p("span", {
1794
1805
  className: "flex-1 text-left",
1795
1806
  children: "Reduced Motion"
1796
1807
  }),
1797
- b && /* @__PURE__ */ p(C, { className: "text-accent h-3.5 w-3.5 shrink-0" })
1808
+ b && /* @__PURE__ */ p(S, { className: "text-accent h-3.5 w-3.5 shrink-0" })
1798
1809
  ]
1799
1810
  }),
1800
1811
  E && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", { className: "border-border my-1 border-t" }), /* @__PURE__ */ m("button", {
1801
1812
  onClick: O,
1802
1813
  className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-7 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
1803
- children: [/* @__PURE__ */ p(de, { className: "h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ p("span", {
1814
+ children: [/* @__PURE__ */ p(ue, { className: "h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ p("span", {
1804
1815
  className: "flex-1 text-left",
1805
1816
  children: n
1806
1817
  })]
@@ -1809,12 +1820,12 @@ function Nt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
1809
1820
  }), document.body)] });
1810
1821
  }
1811
1822
  function Pt({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r, onAccountChange: a, onSignOut: o, signOutPath: s, signOutLabel: c, settingsPath: l, settingsLabel: f, onOpenSettings: h, currentPath: g, onNavigate: _, className: v }) {
1812
- let { sidebarCollapsed: y, sidebarWidth: b, setSidebarWidth: x } = K(), [S, C] = d(/* @__PURE__ */ new Set()), w = u(null), E = u(!1), D = i((e) => {
1823
+ let { sidebarCollapsed: y, sidebarWidth: b, setSidebarWidth: x } = K(), [S, C] = d(/* @__PURE__ */ new Set()), T = u(null), E = u(!1), D = i((e) => {
1813
1824
  if (y) return;
1814
1825
  e.preventDefault(), E.current = !0, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
1815
1826
  let t = (e) => {
1816
- if (!E.current || !w.current) return;
1817
- let t = w.current.getBoundingClientRect(), n = e.clientX - t.left;
1827
+ if (!E.current || !T.current) return;
1828
+ let t = T.current.getBoundingClientRect(), n = e.clientX - t.left;
1818
1829
  x(Math.max(Et, Math.min(n, Dt)));
1819
1830
  }, n = () => {
1820
1831
  E.current = !1, document.body.style.cursor = "", document.body.style.userSelect = "", document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
@@ -1828,7 +1839,7 @@ function Pt({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r
1828
1839
  });
1829
1840
  }
1830
1841
  return /* @__PURE__ */ m("aside", {
1831
- ref: w,
1842
+ ref: T,
1832
1843
  className: I("bg-bg-secondary relative hidden shrink-0 flex-col border-r md:flex", "transition-[width] duration-[200ms] ease-out", "border-border", v),
1833
1844
  style: { width: y ? Ot : b },
1834
1845
  children: [
@@ -1857,7 +1868,7 @@ function Pt({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r
1857
1868
  paddingTop: "0.35em",
1858
1869
  paddingBottom: "0.35em"
1859
1870
  },
1860
- children: [e.title, /* @__PURE__ */ p(T, { className: I("h-3 w-3 transition-transform", n && "-rotate-90") })]
1871
+ children: [e.title, /* @__PURE__ */ p(w, { className: I("h-3 w-3 transition-transform", n && "-rotate-90") })]
1861
1872
  }), (!n || y) && /* @__PURE__ */ p("ul", {
1862
1873
  className: "flex flex-col gap-1",
1863
1874
  children: e.items.map((e) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ p(kt, {
@@ -1918,12 +1929,12 @@ function It({ homeLabel: e = "Dashboard", labels: t = {}, parents: n = {}, curre
1918
1929
  let n = t === s.length - 1;
1919
1930
  return /* @__PURE__ */ m("span", {
1920
1931
  className: "flex items-center gap-1",
1921
- children: [t > 0 && /* @__PURE__ */ p(D, { className: "text-text-tertiary h-3 w-3" }), n ? /* @__PURE__ */ p("span", {
1932
+ children: [t > 0 && /* @__PURE__ */ p(E, { className: "text-text-tertiary h-3 w-3" }), n ? /* @__PURE__ */ p("span", {
1922
1933
  className: "text-text-primary font-medium",
1923
1934
  children: e.label
1924
1935
  }) : /* @__PURE__ */ p("a", {
1925
1936
  href: e.path,
1926
- onClick: (t) => z(t, e.path, i),
1937
+ onClick: (t) => R(t, e.path, i),
1927
1938
  className: I("text-text-tertiary hover:text-text-primary cursor-pointer transition-colors duration-[100ms]"),
1928
1939
  children: e.label
1929
1940
  })]
@@ -1938,9 +1949,9 @@ var Lt = [
1938
1949
  "light",
1939
1950
  "system"
1940
1951
  ], Rt = {
1941
- dark: se,
1942
- light: fe,
1943
- system: oe
1952
+ dark: oe,
1953
+ light: de,
1954
+ system: ae
1944
1955
  }, zt = {
1945
1956
  dark: "Dark",
1946
1957
  light: "Light",
@@ -1962,13 +1973,13 @@ function Bt({ onMobileMenuToggle: e, breadcrumbs: t, showCommandTrigger: n = !0,
1962
1973
  onClick: e,
1963
1974
  className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-7 w-7 cursor-pointer items-center justify-center rounded md:hidden",
1964
1975
  "aria-label": "Toggle menu",
1965
- children: /* @__PURE__ */ p(ie, { className: "h-4 w-4" })
1976
+ children: /* @__PURE__ */ p(re, { className: "h-4 w-4" })
1966
1977
  }),
1967
1978
  /* @__PURE__ */ p("button", {
1968
1979
  onClick: () => l(!c),
1969
1980
  className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover hidden h-7 w-7 cursor-pointer items-center justify-center rounded md:flex",
1970
1981
  "aria-label": c ? "Expand sidebar" : "Collapse sidebar",
1971
- children: p(c ? ue : le, { className: "h-4 w-4" })
1982
+ children: p(c ? le : ce, { className: "h-4 w-4" })
1972
1983
  }),
1973
1984
  t !== !1 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", { className: "bg-border hidden h-4 w-px md:block" }), /* @__PURE__ */ p(It, {
1974
1985
  ...t,
@@ -2082,9 +2093,9 @@ function Ht({ children: e, className: t }) {
2082
2093
  function Ut({ to: e, children: t, onNavigate: n, className: r }) {
2083
2094
  return /* @__PURE__ */ m("a", {
2084
2095
  href: e,
2085
- onClick: (t) => z(t, e, n),
2096
+ onClick: (t) => R(t, e, n),
2086
2097
  className: I("inline-flex items-center gap-1.5", "text-text-tertiary text-xs", "hover:text-text-primary", r),
2087
- children: [/* @__PURE__ */ p(y, { className: "h-3.5 w-3.5" }), t]
2098
+ children: [/* @__PURE__ */ p(v, { className: "h-3.5 w-3.5" }), t]
2088
2099
  });
2089
2100
  }
2090
2101
  //#endregion
@@ -2099,7 +2110,7 @@ function Wt({ checked: e, indeterminate: t, onChange: n, label: r, disabled: i,
2099
2110
  disabled: i,
2100
2111
  onClick: () => n(!e),
2101
2112
  className: I("flex h-4 w-4 shrink-0 items-center justify-center rounded border", "transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", o ? "bg-accent border-accent" : "bg-bg-secondary border-border", !i && "cursor-pointer"),
2102
- children: t ? /* @__PURE__ */ p(ae, { className: "text-text-on-accent h-3 w-3" }) : e ? /* @__PURE__ */ p(C, { className: "text-text-on-accent h-3 w-3" }) : null
2113
+ children: t ? /* @__PURE__ */ p(ie, { className: "text-text-on-accent h-3 w-3" }) : e ? /* @__PURE__ */ p(S, { className: "text-text-on-accent h-3 w-3" }) : null
2103
2114
  }), r && /* @__PURE__ */ p("span", {
2104
2115
  className: "text-text-primary text-xs",
2105
2116
  children: r
@@ -2127,7 +2138,7 @@ function Kt({ columns: e, hidden: t, onToggle: n }) {
2127
2138
  className: "relative",
2128
2139
  ref: o,
2129
2140
  children: [/* @__PURE__ */ p(Gt, {
2130
- icon: k,
2141
+ icon: O,
2131
2142
  onClick: () => a(!r),
2132
2143
  children: "Columns"
2133
2144
  }), r && /* @__PURE__ */ m("div", {
@@ -2160,7 +2171,7 @@ function qt({ page: e, totalPages: t, onPageChange: n }) {
2160
2171
  onClick: () => n(e - 1),
2161
2172
  className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-7 w-7 cursor-pointer items-center justify-center rounded disabled:cursor-not-allowed disabled:opacity-30",
2162
2173
  "aria-label": "Previous page",
2163
- children: /* @__PURE__ */ p(E, { className: "h-3.5 w-3.5" })
2174
+ children: /* @__PURE__ */ p(T, { className: "h-3.5 w-3.5" })
2164
2175
  }),
2165
2176
  r.map((t, r) => t === "ellipsis" ? /* @__PURE__ */ p("span", {
2166
2177
  className: "text-text-tertiary flex h-7 w-7 items-center justify-center text-xs",
@@ -2175,7 +2186,7 @@ function qt({ page: e, totalPages: t, onPageChange: n }) {
2175
2186
  onClick: () => n(e + 1),
2176
2187
  className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-7 w-7 cursor-pointer items-center justify-center rounded disabled:cursor-not-allowed disabled:opacity-30",
2177
2188
  "aria-label": "Next page",
2178
- children: /* @__PURE__ */ p(D, { className: "h-3.5 w-3.5" })
2189
+ children: /* @__PURE__ */ p(E, { className: "h-3.5 w-3.5" })
2179
2190
  })
2180
2191
  ]
2181
2192
  });
@@ -2193,15 +2204,15 @@ function Jt(e, t, n, r) {
2193
2204
  //#endregion
2194
2205
  //#region src/components/tables/ResourceTable.tsx
2195
2206
  function Yt({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: i = "No data", sortKey: a, sortDir: o, onSortChange: s }) {
2196
- let c = s !== void 0, [u, f] = d(null), [h, g] = d("asc"), _ = c ? a ?? null : u, y = c ? o ?? "asc" : h, x = l(() => c ? e : Jt(e, t, _, y), [
2207
+ let c = s !== void 0, [u, f] = d(null), [h, g] = d("asc"), v = c ? a ?? null : u, b = c ? o ?? "asc" : h, x = l(() => c ? e : Jt(e, t, v, b), [
2197
2208
  c,
2198
2209
  e,
2199
2210
  t,
2200
- _,
2201
- y
2211
+ v,
2212
+ b
2202
2213
  ]);
2203
2214
  function S(e) {
2204
- let t = _ === e && y === "asc" ? "desc" : "asc";
2215
+ let t = v === e && b === "asc" ? "desc" : "asc";
2205
2216
  if (c) {
2206
2217
  s(e, t);
2207
2218
  return;
@@ -2220,7 +2231,7 @@ function Yt({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: i =
2220
2231
  onClick: e.sortable ? () => S(e.key) : void 0,
2221
2232
  children: /* @__PURE__ */ m("span", {
2222
2233
  className: "inline-flex items-center gap-1",
2223
- children: [e.header, e.sortable && _ === e.key && p(y === "asc" ? b : v, { className: "h-3 w-3" })]
2234
+ children: [e.header, e.sortable && v === e.key && p(b === "asc" ? y : _, { className: "h-3 w-3" })]
2224
2235
  })
2225
2236
  }, e.key))
2226
2237
  }) }), /* @__PURE__ */ p("tbody", { children: x.length === 0 ? /* @__PURE__ */ p("tr", { children: /* @__PURE__ */ p("td", {
@@ -2245,25 +2256,25 @@ var Xt = {
2245
2256
  success: {
2246
2257
  bg: "bg-green-muted",
2247
2258
  border: "border-green/30",
2248
- icon: w,
2259
+ icon: C,
2249
2260
  iconColor: "text-green"
2250
2261
  },
2251
2262
  warning: {
2252
2263
  bg: "bg-yellow-muted",
2253
2264
  border: "border-yellow/30",
2254
- icon: _,
2265
+ icon: g,
2255
2266
  iconColor: "text-yellow"
2256
2267
  },
2257
2268
  error: {
2258
2269
  bg: "bg-red-muted",
2259
2270
  border: "border-red/30",
2260
- icon: me,
2271
+ icon: pe,
2261
2272
  iconColor: "text-red"
2262
2273
  },
2263
2274
  info: {
2264
2275
  bg: "bg-blue-muted",
2265
2276
  border: "border-blue/30",
2266
- icon: te,
2277
+ icon: j,
2267
2278
  iconColor: "text-blue"
2268
2279
  }
2269
2280
  };
@@ -2416,7 +2427,7 @@ var rn = {
2416
2427
  className: I("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", rn[e], u ? on[t] : an[t], d && !u && ln[d]?.[t], a),
2417
2428
  ...c,
2418
2429
  children: [
2419
- n && /* @__PURE__ */ p(ne, { className: "h-3.5 w-3.5 animate-spin" }),
2430
+ n && /* @__PURE__ */ p(te, { className: "h-3.5 w-3.5 animate-spin" }),
2420
2431
  r && !n && /* @__PURE__ */ p(r, { className: sn[t] }),
2421
2432
  o && (d ? /* @__PURE__ */ p("span", {
2422
2433
  className: cn[d],
@@ -2495,7 +2506,7 @@ function X({ year: e, month: t, selected: n, rangeStart: r, rangeEnd: i, hoverDa
2495
2506
  function w() {
2496
2507
  t === 0 ? s(e - 1, 11) : s(e, t - 1);
2497
2508
  }
2498
- function T() {
2509
+ function D() {
2499
2510
  t === 11 ? s(e + 1, 0) : s(e, t + 1);
2500
2511
  }
2501
2512
  let O = [];
@@ -2512,7 +2523,7 @@ function X({ year: e, month: t, selected: n, rangeStart: r, rangeEnd: i, hoverDa
2512
2523
  onClick: w,
2513
2524
  "aria-label": "Previous month",
2514
2525
  className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-6 w-6 cursor-pointer items-center justify-center rounded-md transition-colors duration-[100ms]",
2515
- children: /* @__PURE__ */ p(E, { className: "h-3.5 w-3.5" })
2526
+ children: /* @__PURE__ */ p(T, { className: "h-3.5 w-3.5" })
2516
2527
  }),
2517
2528
  /* @__PURE__ */ m("span", {
2518
2529
  className: "text-text-primary text-xs font-semibold",
@@ -2525,10 +2536,10 @@ function X({ year: e, month: t, selected: n, rangeStart: r, rangeEnd: i, hoverDa
2525
2536
  }),
2526
2537
  /* @__PURE__ */ p("button", {
2527
2538
  type: "button",
2528
- onClick: T,
2539
+ onClick: D,
2529
2540
  "aria-label": "Next month",
2530
2541
  className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-6 w-6 cursor-pointer items-center justify-center rounded-md transition-colors duration-[100ms]",
2531
- children: /* @__PURE__ */ p(D, { className: "h-3.5 w-3.5" })
2542
+ children: /* @__PURE__ */ p(E, { className: "h-3.5 w-3.5" })
2532
2543
  })
2533
2544
  ]
2534
2545
  }), /* @__PURE__ */ m("div", {
@@ -2581,20 +2592,20 @@ function hn({ children: e, className: t, header: n, footer: r }) {
2581
2592
  //#endregion
2582
2593
  //#region src/components/ui/Combobox.tsx
2583
2594
  function gn({ options: e, value: t, onChange: n, placeholder: r = "Select...", label: a, className: o }) {
2584
- let [c, l] = d(!1), [f, h] = d(""), [g, _] = d(0), v = u(null), y = u(null), b = s(), x = e.find((e) => e.value === t), S = e.filter((e) => e.label.toLowerCase().includes(f.toLowerCase()));
2585
- function w(e) {
2595
+ let [c, l] = d(!1), [f, h] = d(""), [g, _] = d(0), v = u(null), y = u(null), b = s(), x = e.find((e) => e.value === t), C = e.filter((e) => e.label.toLowerCase().includes(f.toLowerCase()));
2596
+ function T(e) {
2586
2597
  h(e), _(0);
2587
2598
  }
2588
2599
  function E(e) {
2589
2600
  switch (e.key) {
2590
2601
  case "ArrowDown":
2591
- e.preventDefault(), _((e) => Math.min(e + 1, S.length - 1));
2602
+ e.preventDefault(), _((e) => Math.min(e + 1, C.length - 1));
2592
2603
  break;
2593
2604
  case "ArrowUp":
2594
2605
  e.preventDefault(), _((e) => Math.max(e - 1, 0));
2595
2606
  break;
2596
2607
  case "Enter":
2597
- e.preventDefault(), S[g] && (n(S[g].value), l(!1));
2608
+ e.preventDefault(), C[g] && (n(C[g].value), l(!1));
2598
2609
  break;
2599
2610
  case "Escape":
2600
2611
  l(!1);
@@ -2626,7 +2637,7 @@ function gn({ options: e, value: t, onChange: n, placeholder: r = "Select...", l
2626
2637
  children: r
2627
2638
  })
2628
2639
  }),
2629
- /* @__PURE__ */ p(T, { className: I("text-text-tertiary pointer-events-none absolute top-1/2 right-2.5 h-3.5 w-3.5 -translate-y-1/2 transition-transform", c && "rotate-180") }),
2640
+ /* @__PURE__ */ p(w, { className: I("text-text-tertiary pointer-events-none absolute top-1/2 right-2.5 h-3.5 w-3.5 -translate-y-1/2 transition-transform", c && "rotate-180") }),
2630
2641
  c && /* @__PURE__ */ m("div", {
2631
2642
  className: "bg-bg-tertiary border-border-strong animate-scale-in absolute top-full right-0 left-0 z-50 mt-1 overflow-hidden rounded-md border shadow-lg",
2632
2643
  children: [/* @__PURE__ */ p("div", {
@@ -2638,10 +2649,10 @@ function gn({ options: e, value: t, onChange: n, placeholder: r = "Select...", l
2638
2649
  type: "text",
2639
2650
  "aria-label": "Search options",
2640
2651
  "aria-controls": b,
2641
- "aria-activedescendant": S[g] ? `${b}-${g}` : void 0,
2652
+ "aria-activedescendant": C[g] ? `${b}-${g}` : void 0,
2642
2653
  "aria-autocomplete": "list",
2643
2654
  value: f,
2644
- onChange: (e) => w(e.target.value),
2655
+ onChange: (e) => T(e.target.value),
2645
2656
  onKeyDown: E,
2646
2657
  placeholder: "Search...",
2647
2658
  className: "bg-bg-secondary text-text-primary border-border placeholder:text-text-disabled focus:border-accent font-control h-7 w-full rounded border pr-2 pl-7 text-xs focus:outline-none"
@@ -2651,10 +2662,10 @@ function gn({ options: e, value: t, onChange: n, placeholder: r = "Select...", l
2651
2662
  id: b,
2652
2663
  className: "max-h-48 overflow-y-auto py-1",
2653
2664
  role: "listbox",
2654
- children: S.length === 0 ? /* @__PURE__ */ p("li", {
2665
+ children: C.length === 0 ? /* @__PURE__ */ p("li", {
2655
2666
  className: "text-text-tertiary px-3 py-2 text-center text-xs",
2656
2667
  children: "No results"
2657
- }) : S.map((e, r) => /* @__PURE__ */ m("li", {
2668
+ }) : C.map((e, r) => /* @__PURE__ */ m("li", {
2658
2669
  id: `${b}-${r}`,
2659
2670
  role: "option",
2660
2671
  "aria-selected": e.value === t,
@@ -2666,7 +2677,7 @@ function gn({ options: e, value: t, onChange: n, placeholder: r = "Select...", l
2666
2677
  children: [/* @__PURE__ */ p("span", {
2667
2678
  className: "flex-1 truncate",
2668
2679
  children: e.label
2669
- }), e.value === t && /* @__PURE__ */ p(C, { className: "h-3 w-3 shrink-0" })]
2680
+ }), e.value === t && /* @__PURE__ */ p(S, { className: "h-3 w-3 shrink-0" })]
2670
2681
  }, e.value))
2671
2682
  })]
2672
2683
  })
@@ -2726,7 +2737,7 @@ function bn({ label: e, value: t, onChange: n, placeholder: r = "Select date..."
2726
2737
  function b(e) {
2727
2738
  n(e), s(!1);
2728
2739
  }
2729
- function x() {
2740
+ function S() {
2730
2741
  !o && t && (_(t.getFullYear()), y(t.getMonth())), s(!o);
2731
2742
  }
2732
2743
  return /* @__PURE__ */ m("div", {
@@ -2740,7 +2751,7 @@ function bn({ label: e, value: t, onChange: n, placeholder: r = "Select date..."
2740
2751
  children: [
2741
2752
  /* @__PURE__ */ p("button", {
2742
2753
  type: "button",
2743
- onClick: x,
2754
+ onClick: S,
2744
2755
  "aria-haspopup": "dialog",
2745
2756
  "aria-expanded": o,
2746
2757
  className: I("flex h-7 w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "px-2 pr-7"),
@@ -2749,7 +2760,7 @@ function bn({ label: e, value: t, onChange: n, placeholder: r = "Select date..."
2749
2760
  children: r
2750
2761
  })
2751
2762
  }),
2752
- /* @__PURE__ */ p(S, { className: "text-text-tertiary pointer-events-none absolute top-1/2 right-2 h-3 w-3 -translate-y-1/2" }),
2763
+ /* @__PURE__ */ p(x, { className: "text-text-tertiary pointer-events-none absolute top-1/2 right-2 h-3 w-3 -translate-y-1/2" }),
2753
2764
  o && /* @__PURE__ */ p("div", {
2754
2765
  ref: l,
2755
2766
  role: "dialog",
@@ -2792,19 +2803,19 @@ function Cn(e) {
2792
2803
  return e.start && e.end ? `${Sn(e.start)} – ${Sn(e.end)}` : e.start ? Sn(e.start) : "";
2793
2804
  }
2794
2805
  function wn({ label: e, value: t, onChange: n, placeholder: r = "Select date range..." }) {
2795
- let [a, o] = d(!1), s = u(null), c = u(null), l = vn(a, s, c), f = /* @__PURE__ */ new Date(), [h, g] = d(t.start?.getFullYear() ?? f.getFullYear()), [_, v] = d(t.start?.getMonth() ?? f.getMonth()), [y, b] = d(null), [x, C] = d("start"), [w, T] = d(t.start), [E, D] = d(t.end);
2806
+ let [a, o] = d(!1), s = u(null), c = u(null), l = vn(a, s, c), f = /* @__PURE__ */ new Date(), [h, g] = d(t.start?.getFullYear() ?? f.getFullYear()), [_, v] = d(t.start?.getMonth() ?? f.getMonth()), [y, b] = d(null), [S, C] = d("start"), [w, T] = d(t.start), [E, D] = d(t.end);
2796
2807
  W(a, i(() => o(!1), []), [s]);
2797
2808
  let O = _ === 11 ? h + 1 : h, k = _ === 11 ? 0 : _ + 1;
2798
2809
  function A() {
2799
2810
  a || (T(t.start), D(t.end), C((t.start && t.end, "start")), t.start && (g(t.start.getFullYear()), v(t.start.getMonth()))), o(!a);
2800
2811
  }
2801
- function j(e) {
2802
- x === "start" ? (T(e), D(null), C("end")) : (w && e < w ? (D(w), T(e)) : D(e), C("start"), n({
2812
+ function ee(e) {
2813
+ S === "start" ? (T(e), D(null), C("end")) : (w && e < w ? (D(w), T(e)) : D(e), C("start"), n({
2803
2814
  start: w && e < w ? e : w,
2804
2815
  end: w && e < w ? w : e
2805
2816
  }), o(!1));
2806
2817
  }
2807
- function ee() {
2818
+ function j() {
2808
2819
  _ === 0 ? (g(h - 1), v(11)) : v(_ - 1);
2809
2820
  }
2810
2821
  function te() {
@@ -2831,7 +2842,7 @@ function wn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
2831
2842
  children: r
2832
2843
  })
2833
2844
  }),
2834
- /* @__PURE__ */ p(S, { className: "text-text-tertiary pointer-events-none absolute top-1/2 right-2 h-3 w-3 -translate-y-1/2" }),
2845
+ /* @__PURE__ */ p(x, { className: "text-text-tertiary pointer-events-none absolute top-1/2 right-2 h-3 w-3 -translate-y-1/2" }),
2835
2846
  a && /* @__PURE__ */ m("div", {
2836
2847
  ref: c,
2837
2848
  role: "dialog",
@@ -2842,7 +2853,7 @@ function wn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
2842
2853
  children: [
2843
2854
  /* @__PURE__ */ p("button", {
2844
2855
  type: "button",
2845
- onClick: ee,
2856
+ onClick: j,
2846
2857
  "aria-label": "Previous month",
2847
2858
  className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-6 w-6 cursor-pointer items-center justify-center rounded-md transition-colors duration-[100ms]",
2848
2859
  children: /* @__PURE__ */ p("span", {
@@ -2853,7 +2864,7 @@ function wn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
2853
2864
  /* @__PURE__ */ p("span", {
2854
2865
  className: "text-text-tertiary text-2xs",
2855
2866
  "aria-live": "polite",
2856
- children: x === "start" ? "Select start date" : "Select end date"
2867
+ children: S === "start" ? "Select start date" : "Select end date"
2857
2868
  }),
2858
2869
  /* @__PURE__ */ p("button", {
2859
2870
  type: "button",
@@ -2873,8 +2884,8 @@ function wn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
2873
2884
  month: _,
2874
2885
  rangeStart: w,
2875
2886
  rangeEnd: E,
2876
- hoverDate: x === "end" ? y : null,
2877
- onSelect: j,
2887
+ hoverDate: S === "end" ? y : null,
2888
+ onSelect: ee,
2878
2889
  onMonthChange: (e, t) => {
2879
2890
  g(e), v(t);
2880
2891
  },
@@ -2884,8 +2895,8 @@ function wn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
2884
2895
  month: k,
2885
2896
  rangeStart: w,
2886
2897
  rangeEnd: E,
2887
- hoverDate: x === "end" ? y : null,
2888
- onSelect: j,
2898
+ hoverDate: S === "end" ? y : null,
2899
+ onSelect: ee,
2889
2900
  onMonthChange: (e, t) => {
2890
2901
  t === 0 ? (g(e - 1), v(11)) : (g(e), v(t - 1));
2891
2902
  },
@@ -2942,27 +2953,27 @@ function An({ label: e, value: t, onChange: n, placeholder: r = "Select date & t
2942
2953
  let [a, o] = d(!1), s = u(null), c = u(null), l = vn(a, s, c), f = /* @__PURE__ */ new Date(), h = t ? En(t.getHours()) : {
2943
2954
  hour12: 12,
2944
2955
  period: "PM"
2945
- }, [g, _] = d(t?.getFullYear() ?? f.getFullYear()), [v, y] = d(t?.getMonth() ?? f.getMonth()), [b, x] = d(String(h.hour12)), [C, w] = d(t ? kn(t.getMinutes()) : "00"), [T, E] = d(h.period), [D, O] = d(t);
2956
+ }, [g, _] = d(t?.getFullYear() ?? f.getFullYear()), [v, y] = d(t?.getMonth() ?? f.getMonth()), [b, S] = d(String(h.hour12)), [C, w] = d(t ? kn(t.getMinutes()) : "00"), [T, E] = d(h.period), [D, O] = d(t);
2946
2957
  W(a, i(() => o(!1), []), [s]);
2947
2958
  function k(e) {
2948
2959
  O(e);
2949
2960
  }
2950
2961
  function A(e) {
2951
2962
  let t = e.replace(/\D/g, "").slice(0, 2);
2952
- x(t);
2963
+ S(t);
2953
2964
  let n = parseInt(t, 10);
2954
- !isNaN(n) && n >= 13 && n <= 23 ? (x(String(n - 12)), E("PM")) : n === 0 && (x("12"), E("AM"));
2965
+ !isNaN(n) && n >= 13 && n <= 23 ? (S(String(n - 12)), E("PM")) : n === 0 && (S("12"), E("AM"));
2955
2966
  }
2956
- function j() {
2967
+ function ee() {
2957
2968
  if (!D) return;
2958
2969
  let e = Math.max(1, Math.min(12, parseInt(b, 10) || 12)), t = Math.max(0, Math.min(59, parseInt(C, 10) || 0)), r = Dn(e, T);
2959
2970
  n(new Date(D.getFullYear(), D.getMonth(), D.getDate(), r, t)), o(!1);
2960
2971
  }
2961
- function ee() {
2972
+ function j() {
2962
2973
  if (!a && t) {
2963
2974
  _(t.getFullYear()), y(t.getMonth()), O(t);
2964
2975
  let e = En(t.getHours());
2965
- x(String(e.hour12)), E(e.period), w(kn(t.getMinutes()));
2976
+ S(String(e.hour12)), E(e.period), w(kn(t.getMinutes()));
2966
2977
  }
2967
2978
  o(!a);
2968
2979
  }
@@ -2977,7 +2988,7 @@ function An({ label: e, value: t, onChange: n, placeholder: r = "Select date & t
2977
2988
  children: [
2978
2989
  /* @__PURE__ */ p("button", {
2979
2990
  type: "button",
2980
- onClick: ee,
2991
+ onClick: j,
2981
2992
  "aria-haspopup": "dialog",
2982
2993
  "aria-expanded": a,
2983
2994
  className: I("flex h-7 w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "px-2 pr-7"),
@@ -2986,7 +2997,7 @@ function An({ label: e, value: t, onChange: n, placeholder: r = "Select date & t
2986
2997
  children: r
2987
2998
  })
2988
2999
  }),
2989
- /* @__PURE__ */ p(S, { className: "text-text-tertiary pointer-events-none absolute top-1/2 right-2 h-3 w-3 -translate-y-1/2" }),
3000
+ /* @__PURE__ */ p(x, { className: "text-text-tertiary pointer-events-none absolute top-1/2 right-2 h-3 w-3 -translate-y-1/2" }),
2990
3001
  a && /* @__PURE__ */ m("div", {
2991
3002
  ref: c,
2992
3003
  role: "dialog",
@@ -3054,7 +3065,7 @@ function An({ label: e, value: t, onChange: n, placeholder: r = "Select date & t
3054
3065
  }),
3055
3066
  /* @__PURE__ */ p("button", {
3056
3067
  type: "button",
3057
- onClick: j,
3068
+ onClick: ee,
3058
3069
  disabled: !D,
3059
3070
  className: I("ml-auto h-6 rounded-md px-3 text-xs font-medium transition-colors duration-[100ms]", D ? "bg-accent text-text-on-accent hover:bg-accent-hover cursor-pointer" : "bg-bg-hover text-text-disabled cursor-not-allowed"),
3060
3071
  children: "Apply"
@@ -3232,7 +3243,7 @@ function Rn({ trigger: e, items: t, align: n = "right" }) {
3232
3243
  triggerWidth: e.width
3233
3244
  }), a(!r), g(-1);
3234
3245
  }
3235
- let S = -1;
3246
+ let C = -1;
3236
3247
  return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
3237
3248
  ref: _,
3238
3249
  onClick: x,
@@ -3251,8 +3262,8 @@ function Rn({ trigger: e, items: t, align: n = "right" }) {
3251
3262
  className: "border-border my-1 border-t",
3252
3263
  role: "separator"
3253
3264
  }, `divider-${t}`);
3254
- S++;
3255
- let n = S;
3265
+ C++;
3266
+ let n = C;
3256
3267
  return /* @__PURE__ */ m("button", {
3257
3268
  role: "menuitem",
3258
3269
  tabIndex: n === h ? 0 : -1,
@@ -3274,7 +3285,7 @@ function Rn({ trigger: e, items: t, align: n = "right" }) {
3274
3285
  className: "text-2xs text-text-tertiary ml-auto pl-4 font-mono",
3275
3286
  children: e.shortcut
3276
3287
  }),
3277
- e.checked && /* @__PURE__ */ p(C, { className: "text-accent ml-auto h-3.5 w-3.5 shrink-0" })
3288
+ e.checked && /* @__PURE__ */ p(S, { className: "text-accent ml-auto h-3.5 w-3.5 shrink-0" })
3278
3289
  ]
3279
3290
  }, e.label || `item-${t}`);
3280
3291
  })
@@ -3378,7 +3389,7 @@ var Un = {
3378
3389
  function Wn({ className: e, size: t = "md" }) {
3379
3390
  return /* @__PURE__ */ p("div", {
3380
3391
  className: I("flex min-h-[200px] items-center justify-center", e),
3381
- children: /* @__PURE__ */ p(ne, { className: I("text-accent animate-spin", Un[t]) })
3392
+ children: /* @__PURE__ */ p(te, { className: I("text-accent animate-spin", Un[t]) })
3382
3393
  });
3383
3394
  }
3384
3395
  //#endregion
@@ -3526,9 +3537,9 @@ function $n({ title: e, description: t, actions: n, children: r, as: i = "h2", c
3526
3537
  //#endregion
3527
3538
  //#region src/components/ui/SelectDropdown.tsx
3528
3539
  function er({ options: e, value: t, onChange: n, label: r, placeholder: a = "Select...", className: o, size: c = "md" }) {
3529
- let [l, f] = d(!1), [h, g] = d(-1), _ = u(null), v = u(null), y = vn(l, _, v), b = s(), x = `${b}-listbox`, S = e.find((e) => e.value === t);
3540
+ let [l, f] = d(!1), [h, g] = d(-1), _ = u(null), v = u(null), y = vn(l, _, v), b = s(), x = `${b}-listbox`, C = e.find((e) => e.value === t);
3530
3541
  W(l, i(() => f(!1), []), [_]);
3531
- function w() {
3542
+ function T() {
3532
3543
  if (!l) {
3533
3544
  let n = e.findIndex((e) => e.value === t);
3534
3545
  g(n >= 0 ? n : 0);
@@ -3570,19 +3581,19 @@ function er({ options: e, value: t, onChange: n, label: r, placeholder: a = "Sel
3570
3581
  children: [
3571
3582
  /* @__PURE__ */ p("button", {
3572
3583
  type: "button",
3573
- onClick: w,
3584
+ onClick: T,
3574
3585
  onKeyDown: E,
3575
3586
  "aria-haspopup": "listbox",
3576
3587
  "aria-expanded": l,
3577
3588
  "aria-controls": l ? x : void 0,
3578
3589
  "aria-activedescendant": l && h >= 0 ? `${b}-option-${h}` : void 0,
3579
3590
  className: I("font-control flex w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", c === "sm" ? "h-6 px-2 pr-6" : "h-7 px-2 pr-7"),
3580
- children: S ? S.label : /* @__PURE__ */ p("span", {
3591
+ children: C ? C.label : /* @__PURE__ */ p("span", {
3581
3592
  className: "text-text-disabled",
3582
3593
  children: a
3583
3594
  })
3584
3595
  }),
3585
- /* @__PURE__ */ p(T, { className: I("text-text-tertiary pointer-events-none absolute top-1/2 h-3 w-3 -translate-y-1/2 transition-transform", c === "sm" ? "right-1.5" : "right-2", l && "rotate-180") }),
3596
+ /* @__PURE__ */ p(w, { className: I("text-text-tertiary pointer-events-none absolute top-1/2 h-3 w-3 -translate-y-1/2 transition-transform", c === "sm" ? "right-1.5" : "right-2", l && "rotate-180") }),
3586
3597
  l && /* @__PURE__ */ p("div", {
3587
3598
  ref: v,
3588
3599
  className: I("bg-bg-tertiary border-border-strong animate-scale-in absolute right-0 left-0 z-[100] overflow-hidden rounded-md border shadow-lg", y ? "bottom-full mb-1" : "top-full mt-1"),
@@ -3602,7 +3613,7 @@ function er({ options: e, value: t, onChange: n, label: r, placeholder: a = "Sel
3602
3613
  children: [/* @__PURE__ */ p("span", {
3603
3614
  className: "flex-1 truncate",
3604
3615
  children: e.label
3605
- }), e.value === t && /* @__PURE__ */ p(C, { className: "h-3 w-3 shrink-0" })]
3616
+ }), e.value === t && /* @__PURE__ */ p(S, { className: "h-3 w-3 shrink-0" })]
3606
3617
  }, e.value))
3607
3618
  })
3608
3619
  })
@@ -3684,7 +3695,7 @@ var rr = r(({ label: e, error: t, className: n, id: r, ...i }, a) => {
3684
3695
  onClick: () => c(!s),
3685
3696
  className: "text-text-tertiary hover:text-text-primary absolute top-1/2 right-2.5 -translate-y-1/2 cursor-pointer",
3686
3697
  "aria-label": s ? "Hide password" : "Show password",
3687
- children: p(s ? j : A, { className: "h-3.5 w-3.5" })
3698
+ children: p(s ? A : k, { className: "h-3.5 w-3.5" })
3688
3699
  })]
3689
3700
  })]
3690
3701
  });
@@ -3812,7 +3823,7 @@ var lr = r(({ label: e, error: t, options: n, className: r, id: i, ...a }, o) =>
3812
3823
  value: e.value,
3813
3824
  children: e.label
3814
3825
  }, e.value))
3815
- }), /* @__PURE__ */ p(T, { className: "text-text-tertiary pointer-events-none absolute top-1/2 right-2.5 h-3.5 w-3.5 -translate-y-1/2" })]
3826
+ }), /* @__PURE__ */ p(w, { className: "text-text-tertiary pointer-events-none absolute top-1/2 right-2.5 h-3.5 w-3.5 -translate-y-1/2" })]
3816
3827
  })]
3817
3828
  });
3818
3829
  });
@@ -3967,7 +3978,7 @@ function yr({ steps: e, currentStep: t, className: n }) {
3967
3978
  children: [
3968
3979
  /* @__PURE__ */ p("div", {
3969
3980
  className: I("flex h-8 w-8 items-center justify-center rounded-full text-xs", r < t && "bg-accent text-text-on-accent", r === t && "border-accent text-accent border-2 font-semibold", r > t && "bg-bg-tertiary border-border text-text-tertiary border"),
3970
- children: r < t ? /* @__PURE__ */ p(C, { className: "h-4 w-4" }) : r + 1
3981
+ children: r < t ? /* @__PURE__ */ p(S, { className: "h-4 w-4" }) : r + 1
3971
3982
  }),
3972
3983
  /* @__PURE__ */ p("span", {
3973
3984
  className: I("text-2xs mt-1.5 hidden sm:block", r === t && "text-accent", r < t && "text-text-primary", r > t && "text-text-tertiary"),
@@ -4224,7 +4235,7 @@ function kr({ title: e = "Drag and drop files here, or click to browse", descrip
4224
4235
  }),
4225
4236
  /* @__PURE__ */ p("div", {
4226
4237
  className: "text-text-tertiary mx-auto mb-3 flex h-9 w-9 items-center justify-center rounded-md bg-bg-tertiary",
4227
- children: n ?? /* @__PURE__ */ p(pe, { className: "h-4.5 w-4.5" })
4238
+ children: n ?? /* @__PURE__ */ p(fe, { className: "h-4.5 w-4.5" })
4228
4239
  }),
4229
4240
  /* @__PURE__ */ p("p", {
4230
4241
  className: "text-text-secondary mb-1 text-xs",
@@ -4619,4 +4630,4 @@ function Yr({ children: e }) {
4619
4630
  });
4620
4631
  }
4621
4632
  //#endregion
4622
- export { Zt as Alert, Vt as AppShell, _e as AreaChart, Qt as AuthCard, Ht as AuthLayout, $t as AuthorByline, q as Avatar, Ut as BackLink, nn as Badge, ye as BarChart, $e as BottomNav, It as Breadcrumbs, J as Button, tt as COMMAND_PALETTE_EVENT, X as CalendarGrid, hn as Card, Wt as Checkbox, Kt as ColumnPicker, gn as Combobox, ot as CommandPalette, nt as DEFAULT_COMMAND_PALETTE_SHORTCUT, _n as DangerZone, bn as DatePicker, wn as DateRangePicker, An as DateTimePicker, Pn as DetailPanel, Fn as Dialog, In as DialogActions, Ln as DividerLabel, Ue as DonutChart, Rn as DropdownMenu, zn as EmptyState, Bn as ErrorBoundary, Gt as FilterButton, Vn as FilterDropdown, Hn as Kbd, Wn as LoadingSpinner, Gn as MetadataGrid, Kn as MetricCard, ct as MobileDrawer, Zn as OAuthButton, Qn as PageHeader, $n as PageSection, qt as Pagination, nr as PaginationBar, rr as PasswordInput, ir as ProfileHeader, ar as ProseContent, Ge as RadarChart, qe as RadialBarChart, or as RadioPill, Yt as ResourceTable, sr as SearchInput, cr as SectionHeader, lr as Select, er as SelectDropdown, ur as SettingRow, G as SettingsContext, qr as SettingsProvider, fr as SideSheet, Pt as Sidebar, dr as Slider, Je as SparkLine, hr as SplitPaneLayout, vr as StatusDot, yr as StepProgress, br as Tabs, Sr as TextInput, xr as Textarea, jr as ThemeContext, Or as ThemePreview, Yr as ThemeProvider, Cr as Timeline, xt as ToastProvider, wr as Toggle, Dr as Toolbar, Er as Tooltip, Bt as TopBar, kr as UploadDropzone, Ze as VerticalBarChart, ht as accentItems, I as cn, ft as darkThemes, mt as fontOptions, Fr as formatDateLong, Pr as formatDateShort, Ir as formatRelative, z as handleAppShellNavigate, R as isAppShellPathActive, V as isLightTheme, dt as lightThemes, it as matchesCommandPaletteShortcut, Qe as navigateToPath, rt as openCommandPalette, Jt as sortRows, U as themeDefaults, lt as themeItems, Ar as useApplyTheme, W as useDismiss, B as useFocusTrap, K as useSettings, Mr as useTheme, bt as useToast };
4633
+ export { Zt as Alert, Vt as AppShell, ge as AreaChart, Qt as AuthCard, Ht as AuthLayout, $t as AuthorByline, q as Avatar, Ut as BackLink, nn as Badge, ve as BarChart, $e as BottomNav, It as Breadcrumbs, J as Button, tt as COMMAND_PALETTE_EVENT, X as CalendarGrid, hn as Card, Wt as Checkbox, Kt as ColumnPicker, gn as Combobox, ot as CommandPalette, nt as DEFAULT_COMMAND_PALETTE_SHORTCUT, _n as DangerZone, bn as DatePicker, wn as DateRangePicker, An as DateTimePicker, Pn as DetailPanel, Fn as Dialog, In as DialogActions, Ln as DividerLabel, Ue as DonutChart, Rn as DropdownMenu, zn as EmptyState, Bn as ErrorBoundary, Gt as FilterButton, Vn as FilterDropdown, Hn as Kbd, Wn as LoadingSpinner, Gn as MetadataGrid, Kn as MetricCard, ct as MobileDrawer, Zn as OAuthButton, Qn as PageHeader, $n as PageSection, qt as Pagination, nr as PaginationBar, rr as PasswordInput, ir as ProfileHeader, ar as ProseContent, Ge as RadarChart, qe as RadialBarChart, or as RadioPill, Yt as ResourceTable, sr as SearchInput, cr as SectionHeader, lr as Select, er as SelectDropdown, ur as SettingRow, G as SettingsContext, qr as SettingsProvider, fr as SideSheet, Pt as Sidebar, dr as Slider, Je as SparkLine, hr as SplitPaneLayout, vr as StatusDot, yr as StepProgress, br as Tabs, Sr as TextInput, xr as Textarea, jr as ThemeContext, Or as ThemePreview, Yr as ThemeProvider, Cr as Timeline, xt as ToastProvider, wr as Toggle, Dr as Toolbar, Er as Tooltip, Bt as TopBar, kr as UploadDropzone, Ze as VerticalBarChart, ht as accentItems, I as cn, ft as darkThemes, mt as fontOptions, Fr as formatDateLong, Pr as formatDateShort, Ir as formatRelative, R as handleAppShellNavigate, Qe as isAppShellPathActive, V as isLightTheme, dt as lightThemes, it as matchesCommandPaletteShortcut, z as navigateToPath, rt as openCommandPalette, Jt as sortRows, U as themeDefaults, lt as themeItems, Ar as useApplyTheme, W as useDismiss, B as useFocusTrap, K as useSettings, Mr as useTheme, bt as useToast };
package/dist/lib/cn.d.ts CHANGED
@@ -1,3 +1,9 @@
1
- import { type ClassValue } from "clsx";
1
+ /**
2
+ * Minimal first-party clsx-equivalent. Flattens strings, numbers, nested
3
+ * arrays, and objects (key kept when its value is truthy) into a space-joined
4
+ * className string; falsy values are ignored. Inlined so the package carries
5
+ * no runtime dependency for a few lines of trivial string-joining.
6
+ */
7
+ export type ClassValue = ClassValue[] | Record<string, unknown> | string | number | bigint | null | boolean | undefined;
2
8
  export declare function cn(...inputs: ClassValue[]): string;
3
9
  //# sourceMappingURL=cn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/lib/cn.ts"],"names":[],"mappings":"AAWA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAwG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
1
+ {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/lib/cn.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAClB,UAAU,EAAE,GACZ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,MAAM,GACN,MAAM,GACN,MAAM,GACN,IAAI,GACJ,OAAO,GACP,SAAS,CAAC;AAiId,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leonardaustin/ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Reusable React component library and application shell for Leonard Austin projects.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -37,27 +37,9 @@
37
37
  },
38
38
  "./styles.css": "./dist/styles.css"
39
39
  },
40
- "scripts": {
41
- "build": "vite build && tsc -p tsconfig.build.json && node scripts/build-css.mjs",
42
- "lint": "eslint .",
43
- "prepublishOnly": "pnpm build"
44
- },
45
- "dependencies": {
46
- "clsx": "^2.1.1"
47
- },
48
40
  "peerDependencies": {
49
41
  "lucide-react": "^1.7.0",
50
42
  "react": "^19.2.4",
51
43
  "react-dom": "^19.2.4"
52
- },
53
- "devDependencies": {
54
- "@types/react": "^19.2.14",
55
- "@types/react-dom": "^19.2.3",
56
- "@vitejs/plugin-react": "^6.0.1",
57
- "lucide-react": "^1.7.0",
58
- "react": "^19.2.4",
59
- "react-dom": "^19.2.4",
60
- "typescript": "~5.9.3",
61
- "vite": "^8.0.16"
62
44
  }
63
45
  }