@leonardaustin/ui 0.31.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -220,5 +220,7 @@ root when using the stylesheet directly.
220
220
  | Cyber Brutal Dark | `cyberBrutalDark` | `theme-cyber-brutal-dark` |
221
221
  | Cyber Brutal Light | `cyberBrutalLight` | `theme-cyber-brutal-light` |
222
222
  | HashiTheme | `hashiTheme` | `theme-hashi` |
223
+ | Studio Light | `studioLight` | `theme-studio-light` |
224
+ | Studio Dark | `studioDark` | `theme-studio-dark` |
223
225
  | Glass Dark | `glassDark` | `theme-glass`, `theme-glass-dark` |
224
226
  | Glass Light | `glassLight` | `theme-glass`, `theme-glass-light` |
@@ -6,21 +6,22 @@ import { accentItems as o } from "../../config/theme.js";
6
6
  import { useAnchoredPopup as s } from "../../hooks/useAnchoredPopup.js";
7
7
  import { useDismiss as c } from "../../hooks/useDismiss.js";
8
8
  import { useSettings as l } from "../../hooks/useSettings.js";
9
- import { Avatar as u } from "../ui/Avatar.js";
10
- import { useToast as d } from "../ui/Toast.js";
11
- import { useCallback as f, useMemo as p, useRef as m, useState as h } from "react";
12
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
13
- import { Accessibility as y, Check as b, ChevronDown as x, ChevronsUpDown as S, LogOut as C, Monitor as w, Moon as T, Settings as E, Sun as D } from "lucide-react";
14
- import { createPortal as O } from "react-dom";
9
+ import { usesThemeAccent as u } from "../../providers/accentColors.js";
10
+ import { Avatar as d } from "../ui/Avatar.js";
11
+ import { useToast as f } from "../ui/Toast.js";
12
+ import { useCallback as p, useMemo as m, useRef as h, useState as g } from "react";
13
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
14
+ import { Accessibility as b, Check as x, ChevronDown as S, ChevronsUpDown as C, LogOut as w, Monitor as T, Moon as E, Settings as D, Sun as O } from "lucide-react";
15
+ import { createPortal as k } from "react-dom";
15
16
  //#region src/components/app-shell/Sidebar.tsx
16
- var k = 140, A = 400, j = 48, M = {
17
+ var A = 140, j = 400, M = 48, N = {
17
18
  side: "right",
18
19
  align: "end",
19
20
  gap: 6
20
21
  };
21
- function N({ item: t, collapsed: i, currentPath: a, onNavigate: o }) {
22
+ function P({ item: t, collapsed: i, currentPath: a, onNavigate: o }) {
22
23
  let s = r(t, a);
23
- return /* @__PURE__ */ v("a", {
24
+ return /* @__PURE__ */ y("a", {
24
25
  href: t.path,
25
26
  onClick: (e) => n(e, t.path, o),
26
27
  "aria-current": s ? "page" : void 0,
@@ -28,152 +29,152 @@ function N({ item: t, collapsed: i, currentPath: a, onNavigate: o }) {
28
29
  style: { height: "2em" },
29
30
  title: i ? t.label : void 0,
30
31
  children: [
31
- s && /* @__PURE__ */ _("div", {
32
+ s && /* @__PURE__ */ v("div", {
32
33
  className: "bg-accent absolute left-0 w-0.5 rounded-md",
33
34
  style: {
34
35
  top: "0.3em",
35
36
  bottom: "0.3em"
36
37
  }
37
38
  }),
38
- /* @__PURE__ */ _("span", {
39
+ /* @__PURE__ */ v("span", {
39
40
  className: "shrink-0",
40
- children: /* @__PURE__ */ _(t.icon, { className: "h-3.5 w-3.5" })
41
+ children: /* @__PURE__ */ v(t.icon, { className: "h-3.5 w-3.5" })
41
42
  }),
42
- !i && /* @__PURE__ */ _("span", {
43
+ !i && /* @__PURE__ */ v("span", {
43
44
  className: "min-w-0 flex-1 truncate text-xs",
44
45
  children: t.label
45
46
  }),
46
- !i && t.badge && /* @__PURE__ */ _("span", {
47
+ !i && t.badge && /* @__PURE__ */ v("span", {
47
48
  className: "ml-auto shrink-0",
48
49
  children: t.badge
49
50
  })
50
51
  ]
51
52
  });
52
53
  }
53
- function P({ brand: t, collapsed: n }) {
54
+ function F({ brand: t, collapsed: n }) {
54
55
  let r = t.icon, i = t.name.trim().charAt(0).toUpperCase();
55
- return t.logo && !n ? /* @__PURE__ */ _("div", {
56
+ return t.logo && !n ? /* @__PURE__ */ v("div", {
56
57
  className: "flex min-w-0 items-center gap-2 px-2",
57
58
  children: t.logo
58
- }) : /* @__PURE__ */ v("div", {
59
+ }) : /* @__PURE__ */ y("div", {
59
60
  className: e("flex min-w-0 items-center gap-2 px-2", n && "mx-auto justify-center px-0"),
60
- children: [r ? /* @__PURE__ */ _(r, { className: "text-accent h-3.5 w-3.5 shrink-0" }) : n && i && /* @__PURE__ */ _("span", {
61
+ children: [r ? /* @__PURE__ */ v(r, { className: "text-accent h-3.5 w-3.5 shrink-0" }) : n && i && /* @__PURE__ */ v("span", {
61
62
  className: "text-accent-fg shrink-0 text-xs font-bold",
62
63
  children: i
63
- }), !n && /* @__PURE__ */ _("span", {
64
+ }), !n && /* @__PURE__ */ v("span", {
64
65
  className: "text-text-primary truncate text-xs font-semibold",
65
66
  children: t.name
66
67
  })]
67
68
  });
68
69
  }
69
- function F(e) {
70
+ function I(e) {
70
71
  return e.role ?? e.email;
71
72
  }
72
- function I({ collapsed: t, accounts: n, initialAccountIndex: r = 0, onAccountChange: o, onSignOut: l, signOutPath: d, signOutLabel: p = "Sign out", onNavigate: y }) {
73
- let [x, w] = h(!1), T = a(), [E, D] = h(() => Math.min(r, Math.max(n.length - 1, 0))), k = m(null), A = m(null), j = f(() => w(!1), []);
74
- c(x, j, [A], [k]), s(x, k, A, {
75
- ...M,
73
+ function L({ collapsed: t, accounts: n, initialAccountIndex: r = 0, onAccountChange: o, onSignOut: l, signOutPath: u, signOutLabel: f = "Sign out", onNavigate: m }) {
74
+ let [b, S] = g(!1), T = a(), [E, D] = g(() => Math.min(r, Math.max(n.length - 1, 0))), O = h(null), A = h(null), j = p(() => S(!1), []);
75
+ c(b, j, [A], [O]), s(b, O, A, {
76
+ ...N,
76
77
  onAnchorHidden: j
77
78
  });
78
- let N = n[E] ?? n[0], P = !!(l || d);
79
- function I() {
80
- w(!x);
79
+ let M = n[E] ?? n[0], P = !!(l || u);
80
+ function F() {
81
+ S(!b);
81
82
  }
82
83
  function L(e, t) {
83
- D(t), o?.(e, t), w(!1);
84
+ D(t), o?.(e, t), S(!1);
84
85
  }
85
86
  function R() {
86
- w(!1), l ? l() : d && i(d, y);
87
+ S(!1), l ? l() : u && i(u, m);
87
88
  }
88
- return N ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("button", {
89
+ return M ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("button", {
89
90
  type: "button",
90
- ref: k,
91
- onClick: I,
91
+ ref: O,
92
+ onClick: F,
92
93
  className: e("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", t && "justify-center px-0"),
93
94
  style: { height: "2.5em" },
94
- title: t ? N.name : void 0,
95
- children: [/* @__PURE__ */ _(u, {
96
- name: N.name,
97
- src: N.avatarSrc,
95
+ title: t ? M.name : void 0,
96
+ children: [/* @__PURE__ */ v(d, {
97
+ name: M.name,
98
+ src: M.avatarSrc,
98
99
  size: "sm"
99
- }), !t && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
100
+ }), !t && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
100
101
  className: "min-w-0 flex-1 text-left",
101
- children: [/* @__PURE__ */ _("p", {
102
+ children: [/* @__PURE__ */ v("p", {
102
103
  className: "text-text-primary truncate text-xs leading-tight font-medium",
103
- children: N.name
104
- }), F(N) && /* @__PURE__ */ _("p", {
104
+ children: M.name
105
+ }), I(M) && /* @__PURE__ */ v("p", {
105
106
  className: "text-2xs text-text-tertiary truncate leading-tight",
106
- children: F(N)
107
+ children: I(M)
107
108
  })]
108
- }), /* @__PURE__ */ _(S, { className: "text-text-tertiary h-3 w-3 shrink-0" })] })]
109
- }), x && O(/* @__PURE__ */ v("div", {
109
+ }), /* @__PURE__ */ v(C, { className: "text-text-tertiary h-3 w-3 shrink-0" })] })]
110
+ }), b && k(/* @__PURE__ */ y("div", {
110
111
  ref: A,
111
112
  className: "ui-glass ui-glass-popover bg-bg-tertiary border-border-strong animate-scale-in fixed top-0 left-0 z-[100] w-56 rounded-md border py-1 shadow-lg",
112
113
  children: [
113
- /* @__PURE__ */ _("p", {
114
+ /* @__PURE__ */ v("p", {
114
115
  className: "text-2xs-f text-text-tertiary font-label px-3 py-1.5 font-semibold tracking-wider uppercase",
115
116
  children: "Accounts"
116
117
  }),
117
- n.map((e, t) => /* @__PURE__ */ v("button", {
118
+ n.map((e, t) => /* @__PURE__ */ y("button", {
118
119
  type: "button",
119
120
  onClick: () => L(e, t),
120
121
  className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-8 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
121
122
  children: [
122
- /* @__PURE__ */ _(u, {
123
+ /* @__PURE__ */ v(d, {
123
124
  name: e.name,
124
125
  src: e.avatarSrc,
125
126
  size: "sm"
126
127
  }),
127
- /* @__PURE__ */ v("div", {
128
+ /* @__PURE__ */ y("div", {
128
129
  className: "min-w-0 flex-1 text-left",
129
- children: [/* @__PURE__ */ _("p", {
130
+ children: [/* @__PURE__ */ v("p", {
130
131
  className: "text-text-primary truncate text-xs leading-tight",
131
132
  children: e.name
132
- }), e.email && /* @__PURE__ */ _("p", {
133
+ }), e.email && /* @__PURE__ */ v("p", {
133
134
  className: "text-2xs text-text-tertiary truncate leading-tight",
134
135
  children: e.email
135
136
  })]
136
137
  }),
137
- t === E && /* @__PURE__ */ _(b, { className: "text-accent h-3.5 w-3.5 shrink-0" })
138
+ t === E && /* @__PURE__ */ v(x, { className: "text-accent h-3.5 w-3.5 shrink-0" })
138
139
  ]
139
140
  }, `${e.name}-${e.email ?? t}`)),
140
- P && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", { className: "border-border my-1 border-t" }), /* @__PURE__ */ v("button", {
141
+ P && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", { className: "border-border my-1 border-t" }), /* @__PURE__ */ y("button", {
141
142
  type: "button",
142
143
  onClick: R,
143
144
  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]",
144
- children: [/* @__PURE__ */ _(C, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ _("span", { children: p })]
145
+ children: [/* @__PURE__ */ v(w, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ v("span", { children: f })]
145
146
  })] })
146
147
  ]
147
148
  }), T ?? document.body)] }) : null;
148
149
  }
149
- function L({ collapsed: t, settingsPath: n, settingsLabel: r = "All Settings", onOpenSettings: u, onNavigate: p }) {
150
- let [x, S] = h(!1), C = a(), k = m(null), A = m(null), { accentColor: j, setAccentColor: N, reducedMotion: P, setReducedMotion: F, colorMode: I, setColorMode: L } = l(), { toast: R } = d(), z = !!(n || u), B = f(() => S(!1), []);
151
- c(x, B, [A], [k]), s(x, k, A, {
152
- ...M,
153
- onAnchorHidden: B
150
+ function R({ collapsed: t, settingsPath: n, settingsLabel: r = "All Settings", onOpenSettings: d, onNavigate: m }) {
151
+ let [S, C] = g(!1), w = a(), A = h(null), j = h(null), { resolvedTheme: M, accentColor: P, setAccentColor: F, reducedMotion: I, setReducedMotion: L, colorMode: R, setColorMode: z } = l(), B = u(M), { toast: V } = f(), H = !!(n || d), U = p(() => C(!1), []);
152
+ c(S, U, [j], [A]), s(S, A, j, {
153
+ ...N,
154
+ onAnchorHidden: U
154
155
  });
155
- function V() {
156
- S(!x);
156
+ function W() {
157
+ C(!S);
157
158
  }
158
- function H() {
159
- S(!1), u ? u() : n && i(n, p);
159
+ function G() {
160
+ C(!1), d ? d() : n && i(n, m);
160
161
  }
161
- return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("button", {
162
+ return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("button", {
162
163
  type: "button",
163
- ref: k,
164
- onClick: V,
165
- className: e("font-navigation relative flex w-full items-center gap-2 rounded px-2", "cursor-pointer transition-colors duration-[100ms]", t ? "mx-auto w-[2em] justify-center" : "", x ? "bg-accent-muted text-accent-fg" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
164
+ ref: A,
165
+ onClick: W,
166
+ className: e("font-navigation relative flex w-full items-center gap-2 rounded px-2", "cursor-pointer transition-colors duration-[100ms]", t ? "mx-auto w-[2em] justify-center" : "", S ? "bg-accent-muted text-accent-fg" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
166
167
  style: { height: "2em" },
167
168
  title: t ? "Settings" : void 0,
168
- children: [/* @__PURE__ */ _(E, { className: "h-3.5 w-3.5 shrink-0" }), !t && /* @__PURE__ */ _("span", {
169
+ children: [/* @__PURE__ */ v(D, { className: "h-3.5 w-3.5 shrink-0" }), !t && /* @__PURE__ */ v("span", {
169
170
  className: "truncate text-xs",
170
171
  children: "Settings"
171
172
  })]
172
- }), x && O(/* @__PURE__ */ v("div", {
173
- ref: A,
173
+ }), S && k(/* @__PURE__ */ y("div", {
174
+ ref: j,
174
175
  className: "ui-glass ui-glass-popover bg-bg-tertiary border-border-strong animate-scale-in fixed top-0 left-0 z-[100] w-64 rounded-md border py-1 shadow-lg",
175
176
  children: [
176
- /* @__PURE__ */ _("p", {
177
+ /* @__PURE__ */ v("p", {
177
178
  className: "text-2xs-f text-text-tertiary font-label px-3 py-1.5 font-semibold tracking-wider uppercase",
178
179
  children: "Mode"
179
180
  }),
@@ -181,128 +182,129 @@ function L({ collapsed: t, settingsPath: n, settingsLabel: r = "All Settings", o
181
182
  {
182
183
  value: "dark",
183
184
  label: "Dark",
184
- Icon: T
185
+ Icon: E
185
186
  },
186
187
  {
187
188
  value: "light",
188
189
  label: "Light",
189
- Icon: D
190
+ Icon: O
190
191
  },
191
192
  {
192
193
  value: "system",
193
194
  label: "System",
194
- Icon: w
195
+ Icon: T
195
196
  }
196
- ].map(({ value: e, label: t, Icon: n }) => /* @__PURE__ */ v("button", {
197
+ ].map(({ value: e, label: t, Icon: n }) => /* @__PURE__ */ y("button", {
197
198
  type: "button",
198
- onClick: () => L(e),
199
+ onClick: () => z(e),
199
200
  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]",
200
201
  children: [
201
- /* @__PURE__ */ _(n, { className: "h-3.5 w-3.5 shrink-0" }),
202
- /* @__PURE__ */ _("span", {
202
+ /* @__PURE__ */ v(n, { className: "h-3.5 w-3.5 shrink-0" }),
203
+ /* @__PURE__ */ v("span", {
203
204
  className: "flex-1 text-left",
204
205
  children: t
205
206
  }),
206
- I === e && /* @__PURE__ */ _(b, { className: "text-accent h-3.5 w-3.5 shrink-0" })
207
+ R === e && /* @__PURE__ */ v(x, { className: "text-accent h-3.5 w-3.5 shrink-0" })
207
208
  ]
208
209
  }, e)),
209
- /* @__PURE__ */ _("div", { className: "border-border my-1 border-t" }),
210
- /* @__PURE__ */ _("p", {
210
+ /* @__PURE__ */ v("div", { className: "border-border my-1 border-t" }),
211
+ /* @__PURE__ */ v("p", {
211
212
  className: "text-2xs-f text-text-tertiary font-label px-3 py-1.5 font-semibold tracking-wider uppercase",
212
- children: "Accent"
213
+ children: B ? "Studio uses its own accent" : "Accent"
213
214
  }),
214
- /* @__PURE__ */ _("div", {
215
+ /* @__PURE__ */ v("div", {
215
216
  className: "flex flex-wrap gap-1.5 px-3 pb-2",
216
- children: o.map((t) => /* @__PURE__ */ _("button", {
217
+ children: o.map((t) => /* @__PURE__ */ v("button", {
217
218
  type: "button",
218
- onClick: () => N(t.value),
219
- className: e("h-5 w-5 cursor-pointer rounded-full transition-transform duration-[100ms] hover:scale-110", j === t.value && "ring-offset-bg-tertiary scale-110 ring-2 ring-offset-1"),
219
+ disabled: B,
220
+ onClick: () => F(t.value),
221
+ className: e("h-5 w-5 cursor-pointer rounded-full transition-transform duration-[100ms] hover:scale-110 disabled:cursor-not-allowed disabled:opacity-40", !B && P === t.value && "ring-offset-bg-tertiary scale-110 ring-2 ring-offset-1"),
220
222
  style: {
221
223
  backgroundColor: t.color,
222
- ...j === t.value ? { "--utility-ring-color": t.color } : {}
224
+ ...!B && P === t.value ? { "--utility-ring-color": t.color } : {}
223
225
  },
224
226
  title: t.value.charAt(0).toUpperCase() + t.value.slice(1)
225
227
  }, t.value))
226
228
  }),
227
- /* @__PURE__ */ _("div", { className: "border-border my-1 border-t" }),
228
- /* @__PURE__ */ v("button", {
229
+ /* @__PURE__ */ v("div", { className: "border-border my-1 border-t" }),
230
+ /* @__PURE__ */ y("button", {
229
231
  type: "button",
230
232
  onClick: () => {
231
- F(!P), R("info", P ? "Animations enabled" : "Animations disabled");
233
+ L(!I), V("info", I ? "Animations enabled" : "Animations disabled");
232
234
  },
233
235
  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]",
234
236
  children: [
235
- /* @__PURE__ */ _(y, { className: "h-3.5 w-3.5 shrink-0" }),
236
- /* @__PURE__ */ _("span", {
237
+ /* @__PURE__ */ v(b, { className: "h-3.5 w-3.5 shrink-0" }),
238
+ /* @__PURE__ */ v("span", {
237
239
  className: "flex-1 text-left",
238
240
  children: "Reduced Motion"
239
241
  }),
240
- P && /* @__PURE__ */ _(b, { className: "text-accent h-3.5 w-3.5 shrink-0" })
242
+ I && /* @__PURE__ */ v(x, { className: "text-accent h-3.5 w-3.5 shrink-0" })
241
243
  ]
242
244
  }),
243
- z && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", { className: "border-border my-1 border-t" }), /* @__PURE__ */ v("button", {
245
+ H && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", { className: "border-border my-1 border-t" }), /* @__PURE__ */ y("button", {
244
246
  type: "button",
245
- onClick: H,
247
+ onClick: G,
246
248
  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]",
247
- children: [/* @__PURE__ */ _(E, { className: "h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ _("span", {
249
+ children: [/* @__PURE__ */ v(D, { className: "h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ v("span", {
248
250
  className: "flex-1 text-left",
249
251
  children: r
250
252
  })]
251
253
  })] })
252
254
  ]
253
- }), C ?? document.body)] });
255
+ }), w ?? document.body)] });
254
256
  }
255
- function R({ navSections: n, brand: r, accounts: i = [], initialAccountIndex: a, onAccountChange: o, onSignOut: s, signOutPath: c, signOutLabel: u, settingsPath: d, settingsLabel: g, onOpenSettings: y, currentPath: b, onNavigate: S, headerActions: C, className: w, style: T, ref: E, ...D }) {
256
- let { sidebarCollapsed: O, sidebarWidth: M, setSidebarWidth: F } = l(), [R, z] = h(/* @__PURE__ */ new Set()), B = m(null), V = p(() => t(B, E), [E]), H = m(!1), [U, W] = h(!1), G = f((e) => {
257
+ function z({ navSections: n, brand: r, accounts: i = [], initialAccountIndex: a, onAccountChange: o, onSignOut: s, signOutPath: c, signOutLabel: u, settingsPath: d, settingsLabel: f, onOpenSettings: _, currentPath: b, onNavigate: x, headerActions: C, className: w, style: T, ref: E, ...D }) {
258
+ let { sidebarCollapsed: O, sidebarWidth: k, setSidebarWidth: N } = l(), [I, z] = g(/* @__PURE__ */ new Set()), B = h(null), V = m(() => t(B, E), [E]), H = h(!1), [U, W] = g(!1), G = p((e) => {
257
259
  if (O) return;
258
260
  e.preventDefault(), H.current = !0, W(!0), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
259
261
  let t = (e) => {
260
262
  if (!H.current || !B.current) return;
261
263
  let t = B.current.getBoundingClientRect(), n = e.clientX - t.left;
262
- F(Math.max(k, Math.min(n, A)));
264
+ N(Math.max(A, Math.min(n, j)));
263
265
  }, n = () => {
264
266
  H.current = !1, W(!1), document.body.style.cursor = "", document.body.style.userSelect = "", document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
265
267
  };
266
268
  document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
267
- }, [O, F]);
269
+ }, [O, N]);
268
270
  function K(e) {
269
271
  z((t) => {
270
272
  let n = new Set(t);
271
273
  return n.has(e) ? n.delete(e) : n.add(e), n;
272
274
  });
273
275
  }
274
- return /* @__PURE__ */ v("aside", {
276
+ return /* @__PURE__ */ y("aside", {
275
277
  ...D,
276
278
  ref: V,
277
279
  className: e("ui-glass ui-glass-chrome bg-bg-secondary relative hidden shrink-0 flex-col border-r md:flex", !U && "transition-[width] duration-[200ms] ease-out", "border-border", w),
278
280
  style: {
279
- width: O ? j : M,
281
+ width: O ? M : k,
280
282
  ...T
281
283
  },
282
284
  children: [
283
- !O && /* @__PURE__ */ _("div", {
285
+ !O && /* @__PURE__ */ v("div", {
284
286
  onMouseDown: G,
285
287
  className: "hover:bg-accent/30 active:bg-accent/50 absolute top-0 right-0 bottom-0 z-10 w-1 cursor-col-resize"
286
288
  }),
287
- /* @__PURE__ */ _("div", {
289
+ /* @__PURE__ */ v("div", {
288
290
  className: "border-border flex shrink-0 items-center border-b px-2",
289
291
  style: { height: "var(--topbar-height)" },
290
- children: /* @__PURE__ */ _(P, {
292
+ children: /* @__PURE__ */ v(F, {
291
293
  brand: r,
292
294
  collapsed: O
293
295
  })
294
296
  }),
295
- !O && C && /* @__PURE__ */ _("div", {
297
+ !O && C && /* @__PURE__ */ v("div", {
296
298
  className: "border-border shrink-0 border-b px-2 py-2",
297
299
  children: C
298
300
  }),
299
- /* @__PURE__ */ _("nav", {
301
+ /* @__PURE__ */ v("nav", {
300
302
  className: "flex-1 overflow-y-auto px-2 py-2",
301
303
  children: n.map((t, n) => {
302
- let r = R.has(t.title);
303
- return /* @__PURE__ */ v("div", {
304
+ let r = I.has(t.title);
305
+ return /* @__PURE__ */ y("div", {
304
306
  className: "mb-4",
305
- children: [O ? n > 0 && /* @__PURE__ */ _("hr", { className: "border-border mx-auto my-1.5 w-4/5" }) : /* @__PURE__ */ v("button", {
307
+ children: [O ? n > 0 && /* @__PURE__ */ v("hr", { className: "border-border mx-auto my-1.5 w-4/5" }) : /* @__PURE__ */ y("button", {
306
308
  type: "button",
307
309
  onClick: () => K(t.title),
308
310
  className: "text-2xs-f text-text-tertiary hover:text-text-secondary font-label flex w-full cursor-pointer items-center gap-1 px-2 text-left font-semibold tracking-wider uppercase",
@@ -310,33 +312,33 @@ function R({ navSections: n, brand: r, accounts: i = [], initialAccountIndex: a,
310
312
  paddingTop: "0.35em",
311
313
  paddingBottom: "0.35em"
312
314
  },
313
- children: [/* @__PURE__ */ _("span", {
315
+ children: [/* @__PURE__ */ v("span", {
314
316
  className: "min-w-0 flex-1",
315
317
  children: t.title
316
- }), /* @__PURE__ */ _(x, { className: e("h-3 w-3 shrink-0 transition-transform", r && "-rotate-90") })]
317
- }), (!r || O) && /* @__PURE__ */ _("ul", {
318
+ }), /* @__PURE__ */ v(S, { className: e("h-3 w-3 shrink-0 transition-transform", r && "-rotate-90") })]
319
+ }), (!r || O) && /* @__PURE__ */ v("ul", {
318
320
  className: "flex flex-col gap-1",
319
- children: t.items.map((e) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _(N, {
321
+ children: t.items.map((e) => /* @__PURE__ */ v("li", { children: /* @__PURE__ */ v(P, {
320
322
  item: e,
321
323
  collapsed: O,
322
324
  currentPath: b,
323
- onNavigate: S
325
+ onNavigate: x
324
326
  }) }, e.path))
325
327
  })]
326
328
  }, t.title);
327
329
  })
328
330
  }),
329
- /* @__PURE__ */ v("div", {
331
+ /* @__PURE__ */ y("div", {
330
332
  className: "shrink-0 px-2 py-1.5",
331
- children: [/* @__PURE__ */ _(L, {
333
+ children: [/* @__PURE__ */ v(R, {
332
334
  collapsed: O,
333
335
  settingsPath: d,
334
- settingsLabel: g,
335
- onOpenSettings: y,
336
- onNavigate: S
337
- }), i.length > 0 && /* @__PURE__ */ _("div", {
336
+ settingsLabel: f,
337
+ onOpenSettings: _,
338
+ onNavigate: x
339
+ }), i.length > 0 && /* @__PURE__ */ v("div", {
338
340
  className: "border-border mt-2 border-t pt-2",
339
- children: /* @__PURE__ */ _(I, {
341
+ children: /* @__PURE__ */ v(L, {
340
342
  collapsed: O,
341
343
  accounts: i,
342
344
  initialAccountIndex: a,
@@ -344,7 +346,7 @@ function R({ navSections: n, brand: r, accounts: i = [], initialAccountIndex: a,
344
346
  onSignOut: s,
345
347
  signOutPath: c,
346
348
  signOutLabel: u,
347
- onNavigate: S
349
+ onNavigate: x
348
350
  })
349
351
  })]
350
352
  })
@@ -352,4 +354,4 @@ function R({ navSections: n, brand: r, accounts: i = [], initialAccountIndex: a,
352
354
  });
353
355
  }
354
356
  //#endregion
355
- export { R as Sidebar };
357
+ export { z as Sidebar };